Skip to content

Raise minimum Python version to 3.8 - #2028

Open
gabrielfruet wants to merge 6 commits into
masterfrom
python-3-8-minimum
Open

Raise minimum Python version to 3.8#2028
gabrielfruet wants to merge 6 commits into
masterfrom
python-3-8-minimum

Conversation

@gabrielfruet

@gabrielfruet gabrielfruet commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Python 3.7 is EOL, so requires-python moves 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

  • SIGReg declares its buffer types, matching center.py and memory_bank.py. Without that mypy splits: on 3.8's torch the buffer arithmetic degrades to Any and trips no-any-return, while the cast() that silences it is redundant under 3.12's torch.
  • Three dependency floors only ever worked on 3.7. six is imported nowhere, so it goes and python-dateutil pulls it in transitively. urllib3 moves to 1.26.5, the first release whose vendored six has find_spec. numpy moves to 1.19.5, what the oldest 3.8-compatible scipy needs.
  • The minimal-deps jobs pin setuptools>=56,<59. Below 56 VendorImporter has no find_spec, which pytest 8 calls on every sys.meta_path entry while collecting; from 59 on, importing setuptools stops pulling in distutils.version, which old torch needs in torch/utils/tensorboard.
  • video floors av at 12.0.0, the first release with cp38 wheels, and drops its now-always-true marker.

Closes #1945.

yashkuceriya and others added 5 commits August 13, 2026 16:02
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>
@gabrielfruet

Copy link
Copy Markdown
Contributor Author

/review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Raise minimum supported Python version to 3.8

2 participants