maint: remove numba as a direct dependency (#483)#898
Merged
Conversation
numba is not imported anywhere in chainladder (grep of the package tree returns no 'import numba' / 'from numba'). It is a hard dependency of sparse (sparse 0.17.0 declares numba>=0.49), which chainladder depends on directly, so numba is still installed transitively after this change. Removing the direct 'numba>0.54' pin also stops chainladder from constraining numba independently of sparse, which was a source of numpy-compatibility friction reported on the issue. Verified: with numba removed from [project.dependencies], uv re-resolves the env with numba 0.63.1 still present (via sparse), and the full test suite passes (717 passed, 12 xfailed) with no new failures. Closes casact#483.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #898 +/- ##
=======================================
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 #483.
numbais listed in[project.dependencies](numba>0.54) but is not imported anywhere in the package — a grep of thechainladder/tree returns noimport numba/from numba.As @jbogaardt noted on the issue, numba is a hard dependency of
sparse, which chainladder depends on directly. I confirmed this against the current pin:sparse 0.17.0declaresnumba>=0.49, so numba is still installed transitively after removing the direct entry. @genedan's 2026-05-18 comment proposed exactly this for 0.9.3.Removing the direct pin also stops chainladder from constraining numba independently of sparse, which is what was causing the numpy-compatibility friction reported earlier in the thread (the chainladder-pinned numba lagging numpy).
Verification
numba>0.54removed from[project.dependencies],uv pip install -e ".[dev]"re-resolves the environment and numba is still present:numba 0.63.1(pulled viasparse).Single-line change to
pyproject.toml. Happy to adjust if you'd prefer to also set a numba floor somewhere explicit, but since it's transitive-only now I left it to sparse to constrain.Note
Low Risk
Single-line dependency metadata change; numba remains via sparse and the suite was verified unchanged.
Overview
Removes
numba>0.54frompyproject.toml[project.dependencies]. The package does not import numba directly; it remains available transitively viasparse, so install graphs still include numba without chainladder imposing its own pin.That avoids an extra, package-level numba constraint that could drift from
sparse’s requirements and contribute to numpy/numba compatibility friction.Reviewed by Cursor Bugbot for commit 899d808. Bugbot is set up for automated code reviews on this repo. Configure here.