Require Python >=3.12#745
Merged
Merged
Conversation
Raise the minimum supported Python version from 3.11 to 3.12 across the workspace: requires-python in every package, trove classifiers, .python-version, README badges, install docs, and the CI matrices. The lockfile is regenerated on 3.12, which drops the <3.12 backport packages (async-timeout, importlib-metadata, tomli, zipp, overrides). This unblocks newer ilamb3 (>=2026.4.20), which requires Python >=3.12.
Raise the ruff target-version to py312 and apply the resulting pyupgrade fixes: datetime.UTC, Self/StrEnum imports, PEP 695 generic syntax, and removal of dead sys.version_info compatibility blocks. Verified: ruff check clean, mypy clean (129 files), and the CLI, config and constraints test suites pass (the StrEnum and PEP 695 generic changes are behaviour-preserving).
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.
Description
Raises the minimum supported Python version to 3.12 and modernises the codebase for it. Two commits:
chore: require Python >=3.12—requires-pythonacross all packages, trove classifiers,.python-version, README badges, install docs, and the CI matrices now target 3.12.uv.lockis regenerated on 3.12, which drops the<3.12backport packages (async-timeout,importlib-metadata,tomli,zipp,overrides).style: modernise syntax for Python 3.12— raises the rufftarget-versiontopy312and applies the resulting pyupgrade fixes:datetime.UTC,Self/StrEnumimports, PEP 695 generic syntax, and removal of deadsys.version_infocompatibility blocks.Motivation: newer
ilamb3(>=2026.4.20, and the in-flightamoc-rapidtrim_timefix) requires Python>=3.12.Verified locally:
ruff checkclean,mypyclean (129 files), the CLI/config/constraints suites pass (452 passed), and the full workspace collects (2331 tests) and builds on 3.12.Checklist
Please confirm that this pull request has done the following:
changelog/