Skip to content

Commit 55dff95

Browse files
authored
bug: refine constraint to avoid numpy pandas incompatability (googleapis#277)
Pins the version of `numpy` used with `python 3.9` to be less than `2.0.0`. There is a potentially unexpected interaction between `pandas` and `numpy` here. Depending on the version we use for each, we get different results in terms of pass/fail for the unit tests associated with `python 3.9` |numpy version|pandas version|unit-3.9 pass/fail| |-|-|-| |2.0.0|1.3.0|fail| |2.0.0|2.2.2|pass| |2.0.0|1.5.3|fail| |1.26.4|1.5.3|pass| |1.26.4|1.3.0|pass| This [appears to be a known incompatibility](https://togithub.com/numpy/numpy/issues/26710) between how `pip` resolves the dependency versions for `numpy` and `pandas` and the only current fix is to pin versions to something that "works" to avoid allowing `pip` to resolve into a failing state. (NOTE the linked issue references various versions of numpy and pandas, depending on the combination, inlcuding 3.9 throughout the thread, even though the title references `python 3.12`) Fixes googleapis#275 🦕
1 parent a718ce4 commit 55dff95

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

testing/constraints-3.9.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Make sure we test with pandas 1.3.0. The Python version isn't that relevant.
22
pandas==1.3.0
3+
numpy<2.0.0

0 commit comments

Comments
 (0)