feat: support numpy >= 1.26 (lower the floor from >= 2.0)#41
Merged
Conversation
rust-numpy binds numpy's C-API at runtime, so the single abi3 wheel already works across numpy 1.26..2.x from one build — the >= 2.0 floor was stricter than necessary and locked out users still on numpy 1.x stacks (common in the py_vollib userbase pyvolr targets as a drop-in). Lowers the pyproject floor to >= 1.26 (the last 1.x line; covers py3.9-3.12), re-locks, and adds a test-numpy-floor CI job that builds, forces numpy down to the floor, asserts the downgrade took (no silent 2.x-by-stealth), and runs the full suite — so the declared floor is proven, not assumed. Verified locally: 133 passed against numpy 1.26.4.
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.
What
Lowers the numpy floor from
>=2.0to>=1.26and adds a CI job that proves the floor.Why
rust-numpy(0.28) binds numpy's C-API at runtime, so the single abi3 wheel pyvolr already ships works across numpy1.26 .. 2.xfrom one build. The>=2.0floor was stricter than the code requires and locked out users still on numpy 1.x — common in the older py_vollib stacks pyvolr targets as a drop-in.1.26is the last numpy 1.x line and covers Python 3.9–3.12; on 3.13+ the resolver naturally picks numpy 2.x (1.26 has no 3.13 wheels), so the floor is a true lower bound, not a cap.Changes
pyproject.toml:numpy>=1.26(+ rationale comment).uv.lock: re-locked — one-line constraint change; resolved versions unchanged (dev still gets 2.x)..github/workflows/ci.yml: newtest-numpy-floorjob — builds, forcesnumpy==1.26.*, asserts the downgrade actually took (no silent 2.x-by-stealth), runs the full suite. Added to theci-passedaggregate.De-risk
Built against numpy 1.26.4 locally and ran the suite: 133 passed, 1 skipped (the skip is the py_vollib differential, import-skipped as usual). actionlint clean;
uv lock --checkclean.This is committed as
feat:because lowering a dependency floor is a backward-compatible compatibility expansion (semver-minor). That means it re-targets the open release PR (#36) from0.1.5→0.2.0. If you'd rather ship it as a0.1.5patch, say so and I'll re-label the commitfix:(a 1-line amend) before you merge the release.🤖 Generated with Claude Code