uv: set minimum numpy version to 2.0 (#810)#899
Merged
Conversation
Running the suite on numpy 1.x breaks tests, so the floor should be numpy 2.x. The existing dependency set already implies a 2.x-compatible window: numba caps numpy at <2.4 and pandas>=2.3.3 needs numpy>=1.26 on py3.12+, but nothing pinned a 2.x floor explicitly. Set 'numpy>=2.0'. Verified in an isolated env pinned to the floor (numpy==2.0.2, which also pulled pandas 3.0.3 / sparse 0.18 / numba 0.65) that uv solves the environment and the full suite passes: 716 passed, 1 skipped, 12 xfailed. Closes casact#810.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #899 +/- ##
=======================================
Coverage 86.90% 86.90%
=======================================
Files 87 87
Lines 4932 4932
Branches 624 624
=======================================
Hits 4286 4286
Misses 456 456
Partials 190 190
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
henrydingliu
approved these changes
Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #810.
Running the suite on numpy 1.x breaks the unit tests, so the floor should be numpy 2.x. The existing dependency set already implies a 2.x-compatible window —
numbacaps numpy at<2.4, andpandas>=2.3.3needsnumpy>=1.26on py3.12+ — but nothing pinned a 2.x floor explicitly. This sets it.Change:
"numpy"→"numpy>=2.0"in[project.dependencies].Why 2.0 and not higher: 2.0 is the lowest numpy 2.x, it satisfies every transitive constraint in the dep tree (pandas, scikit-learn, sparse, numba, matplotlib all resolve against it), and
requires-python>=3.10is compatible with numpy 2.0+. Going higher would over-constrain without cause.Verification (the "uv solves AND passes tests" check from the issue): I built an isolated env and pinned numpy to the floor (
numpy==2.0.2). uv resolved the full environment cleanly, and at that floor the suite passes:(At the floor the resolver also pulled pandas 3.0.3 / sparse 0.18 / numba 0.65.1, so the floor holds even against the newest pandas — not just the currently-pinned 2.3.3.)
I left
uv.lockout of the diff so it regenerates in CI; happy to commit a refreshed lock if you'd prefer it in the PR.Note
Low Risk
Packaging-only constraint change; no runtime or library code is modified.
Overview
Pins NumPy 2.x as the minimum runtime dependency by changing
numpytonumpy>=2.0in[project.dependencies]inpyproject.toml.This aligns declared requirements with the stack the project already expects (tests fail on NumPy 1.x) without changing application code.
Reviewed by Cursor Bugbot for commit a822acc. Bugbot is set up for automated code reviews on this repo. Configure here.