Repository navigation
Conversation
NumPy 2.5 defines `numpy.typing.NDArray` with a PEP 695 `type` statement, which cannot be used as a base class, so `mypy` fails on `class Quantity(npt.NDArray)`. The stub now subclasses `np.ndarray[Any, np.dtype[Any]]` directly, which works with all supported NumPy versions.
Following the policy of NEP 29 plus one year, drop support for Python 3.10 and NumPy 1.24–1.26, and add CI testing for Python 3.15 and NumPy 2.5. CI now installs the latest patch release of each NumPy minor version rather than the .0 release, so that combinations with wheels available in a later patch release use them instead of compiling NumPy from source.
apdavison
force-pushed
the
update-supported-versions
branch
from
October 14, 2026 08:29
1a7c470 to
b352cbd
Compare
This was referenced Oct 24, 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.
Following the policy of NEP 29 plus one year, this PR drops support for NumPy 1.24–1.26 and Python 3.10. Their drop dates were 2025-12-18 (NumPy 1.24), 2026-06-17 (1.25), 2026-09-16 (1.26) and 2026-04-04 (Python 3.10). It also adds Python 3.15 and NumPy 2.5 to the CI matrix.
With NumPy 1.x gone, the
_np_version < (2, 0, 0)code paths inquantity.pyanddimensionality.pycan be removed. I've left that for a separate PR.CI now installs the latest patch release of each NumPy minor version rather than the .0 release, which lacks wheels for some Python versions that later patch releases support. NumPy 2.0–2.4 have no Python 3.15 wheels, so those jobs build NumPy from source.
Also fixes
mypywith NumPy 2.5, wherenumpy.typing.NDArraycan no longer be used as a base class.