Skip to content

Commit ab8dbfc

Browse files
JuliaEdomclaude
andcommitted
chore(deps): take numpy 2.4 and record the ceiling's real reason
The `numpy>=2,<2.4` ceiling arrived on 2026-07-23 (71c41c3) explained as "NumPy 2.4+ bundles PEP 695 syntax in its stubs; mypy targeting the supported Python 3.11 floor cannot parse those stubs." Dependabot has been proposing the widening since 2026-08-23; the PR could not merge because Dependabot edits pyproject.toml without regenerating uv.lock, so the lock-check gate fails (CONTRIBUTING.md documents the manual step). Bringing the lock along was the moment to check the reason, and it does not hold for the released 2.4 line: numpy 2.4.0 and 2.4.6 wheels each ship 264 .pyi files, and none of them contains a PEP 695 `type` statement or a PEP 695 generic parameter list. The mypy half is true and worth keeping in view -- mypy 2.2.0 at --python-version 3.11 still rejects `type Alias = int` with "Type statement is only supported in Python 3.12 and greater [syntax]" -- so the comment now says that a stub release using one turns lint red, rather than naming a version that never did. What does hold is a harder constraint the old comment did not mention: numpy 2.5.0 requires Python >=3.12, and 3.11 is a supported floor here (pyproject `environments` pins the resolution to 3.11-3.13). `<2.5` is therefore what keeps the lock resolvable, not a preference. uv.lock moves numpy 2.3.5 -> 2.4.6 rather than only widening the range: a ceiling raised without moving the pin claims compatibility that nothing tests. requirements-docker.lock is unchanged -- numpy is in `dev`, which the cloud/postgres export does not include, and `src/` imports numpy nowhere. Verified locally with numpy 2.4.6 installed: `mypy src/ --ignore-missing-imports` (the exact lint-job command) reports "Success: no issues found in 157 source files", `uv lock --check` passes (256 packages), `uv export` leaves requirements-docker.lock untouched, and tests/unit/test_windows_shard_thread_pinning.py -- the only test that imports numpy -- passes (8 passed). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ybRVCaL1Lyd9d5kFTndh3
1 parent fb2deb2 commit ab8dbfc

2 files changed

Lines changed: 86 additions & 81 deletions

File tree

‎pyproject.toml‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,16 @@ dev = [
9393
"jsonschema>=4,<5",
9494
"mkdocs>=1.6,<2",
9595
"mkdocs-material>=9.6,<10",
96-
# NumPy 2.4+ bundles PEP 695 syntax in its stubs; mypy targeting the
97-
# supported Python 3.11 floor cannot parse those stubs. This is a dev/type
98-
# checking constraint, not an application runtime dependency.
96+
# NumPy 2.5.0 requires Python >=3.12; 3.11 is a supported floor here, so
97+
# the ceiling is what keeps the lock resolvable across 3.11-3.13 rather
98+
# than a preference. (The ceiling was <2.4 from 2026-07-23, recorded as
99+
# "NumPy 2.4+ bundles PEP 695 syntax in its stubs" -- the released 2.4.0
100+
# and 2.4.6 wheels ship 264 stub files with no PEP 695 syntax in any of
101+
# them, so that reason does not hold for the 2.4 line. The mypy half is
102+
# still true and still worth watching: mypy 2.2.0 at --python-version 3.11
103+
# rejects a `type` statement outright, so a future stub release that uses
104+
# one turns lint red rather than degrading.) This is a dev/type-checking
105+
# constraint, not an application runtime dependency.
99106
"numpy>=2,<2.5",
100107
"pandas>=2.2,<4",
101108
"pytest>=8.3,<10",

0 commit comments

Comments
 (0)