Skip to content

chore: require Python 3.11+, the oldest supported CPython - #15

Merged
SunsetDrifter merged 1 commit into
mainfrom
chore/python-3.11-floor
Oct 8, 2026
Merged

SunsetDrifter merged 1 commit into
mainfrom
chore/python-3.11-floor

Conversation

@SunsetDrifter

Copy link
Copy Markdown
Owner

Summary

Standardizes the Python requirement at 3.11+, the oldest CPython still in security support (EOL 2027-10). 3.9 reached end of life in 2025-10 and 3.10 on 2026-10-01. Local development had been running on 3.9 while CI ran 3.12, which is how a 3.9-only datetime bug slipped past CI in #14.

  • Startup check: wikilint/__init__.py checks the interpreter before importing the engine. An older python3, including one run by the pre-commit hook, prints Scriptorium's lint engine needs Python 3.11+, found 3.9.6. ... and exits 1. The module stays parseable by old interpreters so the message always prints.
  • CI matrix: 3.11 (the floor) and 3.14 (the newest release).
  • Simplification: parse_okf_datetime drops the normalization added in feat: adopt OKF page-level title, generated, and status keys #14, since 3.11's fromisoformat parses Z, any fraction length and +HHMM natively. The regression tests are kept.
  • Docs: the README Install section states the requirement, the yearly bump policy, and the macOS /usr/bin/python3 caveat.

Policy: raise MIN_PYTHON each October when the oldest supported version reaches end of life (next: 3.12 in 2027-10).

Test plan

  • TDD: tests/test_python_floor.py (floor value, message, guard ordering, README, CI matrix) written red first
  • Full suite passes on Python 3.11.14 and 3.14.4 (147 tests)
  • /usr/bin/python3 (3.9.6) on lint.py check prints the one-line message and exits 1
  • Template lints clean on 3.11
  • CI matrix passes on both versions

3.9 went end-of-life in 2025-10 and 3.10 on 2026-10-01; local development
ran on 3.9 while CI ran 3.12, which is how a 3.9-only datetime bug slipped
past CI. The floor is now 3.11 (wikilint.MIN_PYTHON), tracking the oldest
CPython in security support and bumped each October.

- wikilint/__init__.py checks the interpreter before importing the engine,
  so an older python3 (including via the pre-commit hook) gets a one-line
  message naming the version found instead of a traceback.
- CI runs a 3.11 + 3.14 matrix: the floor and the newest release.
- parse_okf_datetime drops its Z/fraction/+HHMM normalization; 3.11's
  fromisoformat parses those natively. The regression tests stay.
- README states the requirement and the macOS /usr/bin/python3 caveat.
@SunsetDrifter
SunsetDrifter merged commit e5f6470 into main Oct 8, 2026
2 checks passed
@SunsetDrifter
SunsetDrifter deleted the chore/python-3.11-floor branch October 8, 2026 08:52
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