Skip to content

Commit

Permalink
Constrain numpy in tests (#1203)
Browse files Browse the repository at this point in the history
### Summary

Numpy released a new version which has caused our tests to fail. See
here for example in Terra:
Qiskit/qiskit#10305

### Details and comments

This PR constrains the version of numpy in the tests. We will need to
Qiskit to align with the new numpy.
  • Loading branch information
eggerdj authored Jun 19, 2023
1 parent a387675 commit feff85c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Numpy 1.25 deprecated some behaviours that we used, and caused some
# tests to flake. See https://github.com/Qiskit/qiskit-terra/issues/10305,
# remove pin when resolving that.
numpy<1.25
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ isolated_build = true

[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
install_command = pip install -c{toxinidir}/constraints.txt -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
QISKIT_SUPPRESS_PACKAGING_WARNINGS=Y
Expand Down

0 comments on commit feff85c

Please sign in to comment.