diff --git a/CHANGELOG.md b/CHANGELOG.md index 492915c..9049a02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,16 @@ Fixed: what the run checked to a statement of when it ran; the unstamped report is the default and the one people paste into issues. +Changed: + +- Minimum supported Python raised from 3.11 to 3.12 (#72), closing CQ-01 + directly against the standard's stated floor (Python 3.10 reaches EOL + October 2026) instead of via the declared deviation `docs/adr/0001` had + recorded since 2026-07-09. `docs/adr/0006-python-312-floor.md` supersedes + 0001. `README.md` and `CONTRIBUTING.md` now say "Requires Python 3.12 or + newer"; CI's test matrix is `3.12`/`3.13` (3.11 dropped). Installed + releases are unaffected; this binds new installs, upgrades, and local dev. + Added: - `TODS-E207` checks that `routes_supplement.txt`'s `route_color` and diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ee78365..78a84ca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ count. ## Setup -Requires Python 3.11 or newer. Dependencies are locked with +Requires Python 3.12 or newer. Dependencies are locked with [uv](https://docs.astral.sh/uv/); CI installs from `uv.lock` with `uv sync --frozen`, which also fails the build if the lockfile has drifted from `pyproject.toml` (CQ-09). Using uv locally keeps your environment diff --git a/README.md b/README.md index 2fca4e6..c69899c 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ runs locally in your browser; feed files are not uploaded. ## Install -Requires Python 3.11 or newer. +Requires Python 3.12 or newer. ```sh pipx install tods-validate diff --git a/docs/CONFORMANCE-GAPS.md b/docs/CONFORMANCE-GAPS.md index 22d1309..de21c81 100644 --- a/docs/CONFORMANCE-GAPS.md +++ b/docs/CONFORMANCE-GAPS.md @@ -76,9 +76,15 @@ runs `uv sync --frozen` (lockfile-drift check for free); `CODEOWNERS` added **Closed 2026-07-09:** the ADR log exists — `docs/adr/0000` (the practice) plus backfills 0001 (3.11 floor, closing **CQ-44/45**'s first item and, with -the committed `.python-version` pinned to CI's 3.12 gate version, **CQ-01**), -0002 (i18n N/A), 0003 (`editor/vscode` nesting, closing **CQ-26**), -0004 (rules-as-registry), 0005 (uv/lockfile adoption). +the committed `.python-version` pinned to CI's 3.12 gate version, **CQ-01** +via a declared deviation), 0002 (i18n N/A), 0003 (`editor/vscode` nesting, +closing **CQ-26**), 0004 (rules-as-registry), 0005 (uv/lockfile adoption). + +**Updated 2026-08-21:** `requires-python` raised to `>=3.12` (#72), closing +**CQ-01** directly against the standard's stated floor instead of via a +declared deviation. `docs/adr/0006-python-312-floor.md` supersedes 0001; +0001 stays in the log as the record of why the deviation existed from +2026-07-09 to 2026-08-21. **Still open:** - **CQ-27** — dev deps still live in `[project.optional-dependencies].dev`, diff --git a/docs/adr/0001-python-311-floor.md b/docs/adr/0001-python-311-floor.md index 752ea1f..50c8bc5 100644 --- a/docs/adr/0001-python-311-floor.md +++ b/docs/adr/0001-python-311-floor.md @@ -1,6 +1,6 @@ # 0001 — Python floor stays at 3.11; dev interpreter pinned to CI's gate version -- Status: accepted (backfilled 2026-07-09; decision in force since the first release) +- Status: superseded by 0006 (2026-08-21; decision was in force 2026-07-09 to 2026-08-21) - Date: 2026-07-09 ## Context diff --git a/docs/adr/0006-python-312-floor.md b/docs/adr/0006-python-312-floor.md new file mode 100644 index 0000000..91be057 --- /dev/null +++ b/docs/adr/0006-python-312-floor.md @@ -0,0 +1,58 @@ +# 0006 — Python floor raised to 3.12; supersedes 0001 + +- Status: accepted (2026-08-21) +- Date: 2026-08-21 +- Supersedes: 0001 (`docs/adr/0001-python-311-floor.md`) + +## Context + +0001 kept `requires-python = ">=3.11"` as a declared, justified deviation +from `CODE-QUALITY-STANDARD.md`'s CQ-01 (which specifies `>=3.12`, 3.11 +allowed only "EOL-track... with a justified ADR"). 0001 named two triggers +for revisiting that floor: a runtime dependency forcing it, or 3.11 leaving +upstream support. + +Neither trigger has fired yet — CPython 3.11 security support runs to +October 2027, and `uv.lock` on `main` still resolved for 3.11 as of #72's +first review pass. What changed is CQ-01's own rationale: Python 3.10 +reaches EOL October 2026, and CQ-01 already treats `>=3.12` (not `>=3.11`) +as the compliant floor, since 3.12 buys structural pattern matching and +`tomllib` everywhere and removes the conditional-import branches an older +floor keeps alive. #72 raised the floor to close that gap directly rather +than continue carrying it as a declared deviation. + +A 2026-07-31 review of #72 (see the PR's review comments) blocked it as +written: mechanically clean, but it reversed 0001 without a superseding +ADR, without updating `README.md`/`CONTRIBUTING.md` (both still said +"Requires Python 3.11 or newer"), and without a CHANGELOG entry, and it +sequenced ahead of the then-held v0.9.0 release scope. The v0.9.0 hold has +since resolved (v0.9.0 shipped 2026-08-16); this ADR and the accompanying +doc/CHANGELOG updates close the three mechanical gaps the review named. + +## Decision + +- `requires-python = ">=3.12"` (landed in #72, merged 2026-08-21/22). + `.python-version`, ruff `target-version`, mypy `python_version`, + classifiers, and the CI test matrix (`3.12`, `3.13`) all agree with the + new floor; `3.11` was dropped from the matrix in the same PR. +- This is a direct compliance with CQ-01's stated floor, not a new declared + deviation — 0001's "declared deviation" framing no longer applies, and + 0001 is superseded rather than amended, so the record of why the + deviation existed for over a month stays intact. +- `README.md` and `CONTRIBUTING.md` are updated to state "Requires Python + 3.12 or newer" (they were left saying 3.11 when #72 merged; fixed here). + `CHANGELOG.md`'s Unreleased section gets a `Changed:` entry, since this is + a user-facing floor raise the same way 0001 said it should be if it ever + happened. + +## Consequences + +- Contributors and CI on Python 3.11 no longer install; 3.11 users on a + pinned `tods-validate` release are unaffected (the floor only binds new + installs/upgrades and local dev). +- `docs/CONFORMANCE-GAPS.md`'s CQ-01 entry is updated: it previously + described CQ-01 as closed via 0001's declared deviation plus a + `.python-version` pinned ahead of the floor; it is now closed by the + floor itself matching the standard, with no deviation to declare. +- If the floor needs to move again, follow 0001's own precedent: a new ADR, + not a silent `pyproject.toml` edit.