Skip to content

docs: add Python >= 3.12 modernization task specification and plan - #2840

Closed
egparedes wants to merge 1 commit into
mainfrom
modernize-py312-style
Closed

docs: add Python >= 3.12 modernization task specification and plan#2840
egparedes wants to merge 1 commit into
mainfrom
modernize-py312-style

Conversation

@egparedes

Copy link
Copy Markdown
Contributor

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

  • Baseline (§2): 1905 UP findings in src/, plus an inventory of the
    stdlib shims, version-gated code, and the two eve structures the campaign has
    to deal with first.
  • Ruff proposal (§3): bump to 0.16.4, and a per-ruleset recommendation with
    measured hit counts — what to enable, and what to reject with the reason
    recorded
    , so the question is not reopened every six months. EM is rejected
    because it contradicts the error-message rules in CODING_GUIDELINES.md; TC
    because it would move imports behind TYPE_CHECKING, which eve resolves at
    runtime.
  • Risk register (§4): four of the seven entries share one failure mode — they
    do not raise. That is what makes this different from an ordinary lint sweep.
  • Plan (§5): six PRs, split by how a reviewer checks each one rather than by
    topic, with the reasoning for what is merged and what is kept separate.
  • Documentation work (§6) and audit findings (§7), including the gaps that
    are deliberately not fixed and why.

Notable findings that came out of writing it

  • The tests/** ruff exclusion cannot simply be deleted: its 2241 findings are
    dominated by pytest and DSL idioms (413 F811 from fixtures, 213 F841 from
    traced @field_operator bodies), so it needs per-file-ignores, not removal.
  • CHANGELOG.md is only touched by release commits, so entries come from PR
    titles at release time — the plan reflects that.
  • Two stale cross-references in the existing docs (CODING_GUIDELINES.md points
    at a directory that does not exist; onboarding.md at a moved file), and a
    contradiction between AGENTS.md and CODING_GUIDELINES.md on Sphinx roles in
    docstrings that needs a decision either way.

Deleting this file, or folding the durable parts into CODING_GUIDELINES.md and
an ADR, is part of the last PR in the stack.

@egparedes

Copy link
Copy Markdown
Contributor Author

Closing: the implementation plan is a local working document and should not land upstream. The two implementation PRs (#2841, #2842) no longer carry it — #2841 now targets main directly.

@egparedes egparedes closed this Aug 27, 2026
@egparedes
egparedes deleted the modernize-py312-style branch August 27, 2026 18:37
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.

1 participant