docs: add Python >= 3.12 modernization task specification and plan - #2840
Closed
egparedes wants to merge 1 commit into
Closed
docs: add Python >= 3.12 modernization task specification and plan#2840egparedes wants to merge 1 commit into
egparedes wants to merge 1 commit into
Conversation
Contributor
Author
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.
Working document for a multi-PR campaign that brings the codebase onto a single
Python >= 3.12 dialect and upgrades the QA that keeps it there. No code changes
here — this is the specification and plan the rest of the stack implements.
It is deliberately evidence-first: every number was measured against this commit
rather than estimated, so the scope argument can be checked rather than taken on
trust.
What it contains
UPfindings insrc/, plus an inventory of thestdlib shims, version-gated code, and the two
evestructures the campaign hasto deal with first.
measured hit counts — what to enable, and what to reject with the reason
recorded, so the question is not reopened every six months.
EMis rejectedbecause it contradicts the error-message rules in
CODING_GUIDELINES.md;TCbecause it would move imports behind
TYPE_CHECKING, whicheveresolves atruntime.
do not raise. That is what makes this different from an ordinary lint sweep.
topic, with the reasoning for what is merged and what is kept separate.
are deliberately not fixed and why.
Notable findings that came out of writing it
tests/**ruff exclusion cannot simply be deleted: its 2241 findings aredominated by pytest and DSL idioms (413
F811from fixtures, 213F841fromtraced
@field_operatorbodies), so it needs per-file-ignores, not removal.CHANGELOG.mdis only touched by release commits, so entries come from PRtitles at release time — the plan reflects that.
CODING_GUIDELINES.mdpointsat a directory that does not exist;
onboarding.mdat a moved file), and acontradiction between
AGENTS.mdandCODING_GUIDELINES.mdon Sphinx roles indocstrings that needs a decision either way.
Deleting this file, or folding the durable parts into
CODING_GUIDELINES.mdandan ADR, is part of the last PR in the stack.