Update dependency numpy to v2.5.1#285
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 681f9c915f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| librosa==0.11.0 | ||
| nltk==3.9.4 | ||
| numpy==2.3.5 | ||
| numpy==2.4.6 |
There was a problem hiding this comment.
Keep NumPy within Numba's supported range
This template still installs numba==0.63.1 on the next line, and Numba's official install matrix for 0.63.1 supports NumPy 2.0 <= version < 2.4; pinning numpy==2.4.6 makes the pip install --no-cache-dir -r requirements.txt step in template/template.py unsatisfiable, so template builds that install this requirements file will fail unless Numba is upgraded to a release with NumPy 2.4 support.
Useful? React with 👍 / 👎.
| numpy==2.4.6 | ||
| numba==0.63.1 |
There was a problem hiding this comment.
🔴 numpy is bumped to 2.4.6 while numba remains pinned at 0.63.1, whose published metadata declares numpy<2.4,>=1.22 — pip's resolver cannot satisfy both pins, so pip install -r requirements.txt will fail with ResolutionImpossible during the template build (build_test.py / build_docker.py / build_prod.py). Fix by also bumping numba to a release that supports numpy 2.4 (numba >=0.64, e.g. 0.65.x) in the same PR, or hold this PR until that pairing is available.
Extended reasoning...
What's wrong
template/requirements.txt now pins numpy==2.4.6 (line 23) alongside numba==0.63.1 (line 24). According to PyPI metadata for numba 0.63.1 (https://pypi.org/pypi/numba/0.63.1/json), its requires_dist is:
llvmlite<0.47,>=0.46.0dev0
numpy<2.4,>=1.22
The upper bound numpy<2.4 explicitly excludes numpy 2.4.6, so the two exact pins are mutually unsatisfiable.
How it manifests
template/template.py runs pip install --no-cache-dir -r requirements.txt inside the sandbox image as part of template/build_test.py, template/build_docker.py, and template/build_prod.py. With both packages exact-pinned, pip's resolver has no slack to backtrack on either side and aborts with a ResolutionImpossible error before any code runs. The template image build therefore fails outright on this PR, and any downstream CI that builds the template will go red.
Step-by-step proof
- Renovate bumps line 23 to
numpy==2.4.6(exact pin). - Line 24 still says
numba==0.63.1(exact pin, untouched). build_prod.py(orbuild_test.py/build_docker.py) invokes the docker build, which runspip install --no-cache-dir -r requirements.txt.- pip downloads numba 0.63.1's metadata and sees
Requires-Dist: numpy<2.4,>=1.22. - pip tries to find a numpy that satisfies both
==2.4.6(from requirements.txt) and<2.4,>=1.22(from numba). The intersection is empty. - pip emits
ERROR: ResolutionImpossible: ...and exits non-zero. The template image build fails.
Why existing code doesn't catch this
Renovate updated numpy in isolation; nothing in the repo cross-checks compatible numpy/numba pairings before opening the PR. The conflict only surfaces at install time, which is precisely when the template build runs.
Fix
Bump numba in the same PR to a release that allows numpy 2.4 — for reference, numba 0.65.1 declares numpy<2.5,>=1.22 and would resolve cleanly with numpy 2.4.6. The coordinated bump (numpy==2.4.6 + numba>=0.65,<0.66) is the standard fix for this class of renovate breakage. Alternatively, hold this PR until a numba/numpy pairing is available.
681f9c9 to
87baffd
Compare
87baffd to
006507e
Compare
006507e to
6b1ebee
Compare
This PR contains the following updates:
==2.3.5→==2.5.1Configuration
📅 Schedule: (in timezone UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.