Repository navigation
Drop Python 3.9 - #165
Merged
Merged
Drop Python 3.9#165
Conversation
Python 3.9 reached its end of life a year ago and is no longer supported. The package now asks for 3.10 or later, which also stops cibuildwheel from building cp39 wheels, since it reads requires-python. The pins that existed only for 3.9 go with it: numpy 2.0.2, and pytest 8.4.2, which leaves a single pytest pin with no marker. So do the Renovate rules that capped those two pins, the 3.9 entries of the test matrix, and 3.9 in the versions Sonar analyses for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ruff now targets py310, and the two things written that way only for 3.9 go: - DeviceSpec is a union built at import time rather than an annotation, which 3.9 could only spell with typing.Union. It is now X | Y. - The numpy_speaks_dlpack_1 mark skipped three tests where numpy predates 2.1. The oldest numpy left is 2.2.6, for 3.10, so the mark never skipped anything. zip() in check_wheels_agree.py gains strict=True, which 3.10 introduced and ruff now asks for. The lengths are compared just before, so it states what the loop already relies on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The rule for `from __future__ import annotations` gave 3.9 as its reason. The import is still needed, now for what it actually does: no annotation is evaluated at import, so a module can name what it imports only for type checking, as em/image/_functions.py does with numpy. - The numpy pins start at 2.2 now, all of which speak versioned DLPack, so the mark that skipped tests on 3.9 is gone from the description too. - The test matrix runs 3.10 through 3.14. Co-Authored-By: Claude Opus 5.5 <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.



Python 3.9 reached its end of life a year ago. The package now requires 3.10.
Three commits, each passing ruff on its own:
requires-python, the classifiers, and the pins that existed only for 3.9 (numpy 2.0.2; pytest 8.4.2, which leaves one pytest pin with no marker). The Renovate rules that capped those two pins, the 3.9 entries of the test matrix, and 3.9 in Sonar's analysed versions go with them. cibuildwheel readsrequires-python, so it stops building cp39 wheels without any change todeploy.yml.DeviceSpec, a union built at import time rather than an annotation, becomesX | Yinstead oftyping.Union. Thenumpy_speaks_dlpack_1mark goes: it skipped tests where numpy predates 2.1, and the oldest numpy left is 2.2.6.zip()incheck_wheels_agree.pygainsstrict=True, which ruff now asks for; the lengths are compared just before.from __future__ import annotationskeeps the import but gives its actual reason: annotations are never evaluated at import, soem/image/_functions.pycan name numpy, which it imports only underTYPE_CHECKING.DeviceSpecis evaluated when the package is imported, so the test matrix is what proves the union builds on pybind11's classes.🤖 Generated with Claude Code