Raise minimum Python version to 3.8 - #2028
Open
gabrielfruet wants to merge 6 commits into
Open
Conversation
Annotate SIGReg's buffers so mypy agrees on 3.8 and 3.12, move the minimal-deps setuptools pin to >=56,<60 for pytest 8, and record why the av floor is 12.0.0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both ship a bundled six whose _SixMetaPathImporter predates find_spec, which pytest 8 calls on every sys.meta_path entry while collecting. six is imported nowhere in the package, so dropping it leaves python-dateutil to pull it in as a transitive dependency at a current version. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
setuptools 59 stopped importing distutils.version as a side effect, which old torch reaches for in torch/utils/tensorboard. 58.5.3 is the newest release that has both that and VendorImporter.find_spec. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The minimal-deps job installs dev dependencies at their latest versions, so scikit-learn pulls in a scipy that needs numpy.random.bit_generator. numpy 1.18.1 does not have it. On Python 3.7 the resolved scipy was old enough not to care. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
9 tasks
Contributor
Author
|
/review |
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.7 is EOL, so
requires-pythonmoves to>=3.8, along with the classifiers, CI matrices, Ruff target and docs. Picks up #2000 by @yashkuceriya, rebased with its CI failures fixed.Changes
SIGRegdeclares its buffer types, matchingcenter.pyandmemory_bank.py. Without that mypy splits: on 3.8's torch the buffer arithmetic degrades toAnyand tripsno-any-return, while thecast()that silences it is redundant under 3.12's torch.sixis imported nowhere, so it goes andpython-dateutilpulls it in transitively.urllib3moves to 1.26.5, the first release whose vendored six hasfind_spec.numpymoves to 1.19.5, what the oldest 3.8-compatible scipy needs.setuptools>=56,<59. Below 56VendorImporterhas nofind_spec, which pytest 8 calls on everysys.meta_pathentry while collecting; from 59 on, importing setuptools stops pulling indistutils.version, which old torch needs intorch/utils/tensorboard.videofloorsavat 12.0.0, the first release with cp38 wheels, and drops its now-always-true marker.Closes #1945.