Migrate to Numpy 2.2+ and Python 3.11+ #87
Merged
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.
This pull request bumps the version dependencies for Python and Numpy, as noted in issue #86. Numpy 1.26 is reaching its end of life in September 2025. Updating to a more recent version of Numpy 2.* requires bumping the minimum supported version of Python as well.
Changes in this PR specify a minimum NumPy version of 2.2, with 2.3 being the most recent stable version at the time of writing. To accompany this, the minimum Python version was bumped to 3.11.
Updating beyond Python 3.10 raised two new Ruff linting rules. A new method for typing unions was introduced in 3.10, with Ruff rule UP007 recommending nearly 100 changes to existing typing rules. I chose to ignore this rule, as the current method of typing, while perhaps a bit less elegant, is not being deprecated anytime soon. The other change was around 3.11, where a
strict
parameter was introduced forzip()
. Following Ruff rule B905, I made a series of updates to the code to addstrict=false
to allzip()
calls, which was the default behaviour. Not changes in functionality were observed.