Repository navigation
Conversation
mlx-whisper declares `numba` with no lower bound. When resolving from
published metadata, numpy floats to >=2.5 while modern numba caps it at
<2.5, so the resolver backtracks numba to 0.53.1 -- a 2021 release that
predates the cap entirely. That drags in llvmlite 0.36, whose setup.py
hard-fails on any Python >=3.10:
RuntimeError: Cannot install on Python version 3.13.12;
only versions >=3.6,<3.10 are supported
So `pip install whispermlx` / `uv tool install whispermlx` fails on every
Python this project supports.
CI misses it because both jobs install through `uv sync`, which reads
uv.lock -- and the lock already pins a working numba 0.64.0 / numpy 2.2.6.
The broken resolution only happens from published metadata.
Fixes:
- pin numba>=0.61 (first release supporting modern numpy and Python 3.13)
- add an install-from-metadata CI job that builds the wheel and installs
it outside the project tree, where neither uv.lock nor [tool.uv]
settings apply -- the same inputs a PyPI user gets
Verified on a clean 3.13 venv from the built wheel:
llvmlite 0.48.0, numba 0.66.0, numpy 2.4.6.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe project directly requires ChangesCompatibility validation
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/python-compatibility.yml (1)
73-73: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winExercise the dependency runtime path, not only the package root.
whispermlxlazily imports its implementation modules, soimport whispermlxalone can pass without loading the Numba/llvmlite stack. Import those dependencies explicitly in this metadata-install job to catch runtime incompatibilities earlier. (github.com)Suggested smoke-test expansion
- uv run --no-project python -c "import whispermlx; print('Successfully imported whispermlx')" + uv run --no-project python -c "import whispermlx, numba, llvmlite; print('Successfully imported whispermlx, numba, and llvmlite')"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/python-compatibility.yml at line 73, Expand the smoke-test command in the dependency metadata-install job to explicitly import the Numba and llvmlite runtime dependencies in addition to whispermlx. Keep the successful-import message and ensure the command exercises those dependency modules rather than only the lazy package root import.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/python-compatibility.yml:
- Line 73: Expand the smoke-test command in the dependency metadata-install job
to explicitly import the Numba and llvmlite runtime dependencies in addition to
whispermlx. Keep the successful-import message and ensure the command exercises
those dependency modules rather than only the lazy package root import.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 028e1279-adbd-410f-b38e-e877f00abedb
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
.github/workflows/python-compatibility.ymlpyproject.toml
whispermlx imports its implementation modules lazily, so `import whispermlx` loads neither numba nor llvmlite — verified, it pulls 5 modules and none of them are the ones this job guards. Does not change what this job catches for the numba case (that one fails during the llvmlite build, before any import), but it covers the adjacent failure mode where a wheel installs cleanly and the shared library will not load. Thanks @coderabbitai for the catch.
|
Good catch on the lazy imports — verified it locally: Applied in 6090991. It doesn't change what this job catches for the numba case specifically (that one fails during the llvmlite build, before any import runs), but it covers the adjacent failure mode where a wheel installs cleanly and the shared library then refuses to load. That mode is not hypothetical here, incidentally. Installation succeeds; the failure only appears at import. Happy to add |
KalebJS
left a comment
There was a problem hiding this comment.
looks overall good, and builds properly. resolve those comments and we can merge.
| # The job above installs from uv.lock, so it never exercises the resolution | ||
| # a downstream `pip install whispermlx` actually performs. This one builds | ||
| # the wheel and installs it from outside the project tree, where neither the | ||
| # lockfile nor [tool.uv] settings apply — the same inputs PyPI users get. |
| # mlx-whisper depends on numba without a lower bound. Resolving from | ||
| # published metadata, numpy floats to >=2.5 and numba (capped at | ||
| # numpy<2.5) is backtracked to 0.53.1, which pulls llvmlite 0.36 and | ||
| # fails to build on Python >=3.10. 0.61 is the first release supporting | ||
| # modern numpy and Python 3.13. | ||
| "numba>=0.61", |
|
No action taken as a result of response-I just implemented your changes myself. Thanks for surfacing the issue and identifying a solution! |
Problem
pip install whispermlxanduv tool install whispermlxcurrently fail on every supported Python version:Root cause
mlx-whisperdeclaresnumbawith no lower bound. Resolving from published metadata,numpyfloats to 2.5.1, while modernnumbacaps it at<2.5. The resolver reconciles that by backtracking numba rather than numpy — all the way to 0.53.1, a 2021 release predating the cap entirely. That version pullsllvmlite0.36, whosesetup.pyhard-fails on any Python>=3.10.Reproducible with just the two packages:
mlx-whisperalone resolves fine — it's the wider dependency graph that gives numpy enough weight to win the ordering.Why CI is green
Both jobs in
python-compatibility.ymlinstall viauv sync, which readsuv.lock. The lockfile already pins a workingnumba 0.64.0/numpy 2.2.6, so the broken resolution never runs in CI. It only happens from published metadata, which is exactly what end users get.Changes
numba>=0.61floor independencies— 0.61 is the first release supporting modern numpy and Python 3.13. Comment explains the constraint so it isn't dropped as mysterious later.install-from-metadataCI job — builds the wheel and installs it from a temp directory outside the project tree, where neitheruv.locknor[tool.uv]settings apply. This is the job that would have caught the bug.Verification
Clean 3.13 venv, patched wheel, installed from outside the project:
numpy<2.5works identically as a constraint if you'd prefer expressing it that way — I went with the numba floor since numba is the package that actually needs bounding.Summary by CodeRabbit
numba>=0.61requirement to avoid issues with NumPy/Python compatibility.