Pin numpy<2.5 to work around katpoint np.row_stack removal - #78
Merged
Conversation
numpy 2.5.0 removed np.row_stack, which katpoint 0.10.2 (its latest
release) still calls in Target.uvw_basis. Every test that opens a
datatree fails with:
AttributeError: module 'numpy' has no attribute 'row_stack'
katpoint fixed this upstream in 122f90d8 but has not cut a release,
so constrain numpy until one is available.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Diagnosis
The scheduled CI run #31663455147 failed on every Python 3.12/3.13/3.14 job (3.11 was green) with a single root cause:
np.row_stackwas deprecated in numpy 2.0 and removed in numpy 2.5.0 (verified: it still exists in 2.4.6). numpy 2.5 requires Python >= 3.12, so the 3.11 jobs resolved to 2.4.x and passed while everything else picked up 2.5.2 (released 2026-08-09, four days before the failing run).The call site is in
katpoint, not in this repo.katpointfixed it upstream in122f90d8("SPR1-3236 Replace deprecated row_stack with vstack", June 2025), but no release contains it — 0.10.2 (Oct 2024) is still the latest on PyPI.All 23 failures on 3.12/3.13 and all 14 on 3.14 trace to this one attribute; no other errors were present.
Fix
Add
numpy<2.5to[project].dependencies, with a comment naming the upstream fix so the pin can be dropped once katpoint cuts a release. numpy is imported directly byxarray_katanyway, so declaring it explicitly is correct regardless.This is a genuine runtime incompatibility, not just a test-environment issue — UVW computation is core functionality, so any user on numpy >= 2.5 hits it. The constraint therefore belongs in the runtime dependencies rather than the test group.
Verification
Full suite run locally on all four matrix Python versions (resolves to numpy 2.4.6):
Confirmed the failure reproduces on 3.13 before the change.
uv run --dev pre-commit run -apasses.🤖 Generated with Claude Code