Skip to content

chore: drop Python 3.10 support - #336

Merged
JuroOravec merged 3 commits into
mainfrom
chore/drop-python-3.10
Oct 24, 2026
Merged

JuroOravec merged 3 commits into
mainfrom
chore/drop-python-3.10

Conversation

@JuroOravec

Copy link
Copy Markdown
Member

Part of #177 (it does not close it: Python 3.15 waits for the PyO3 upgrade). Using 3.11-only syntax and APIs is left to #331.

Python 3.10 reached its end of life on 2026-10-01. Every package now requires Python 3.11 or newer.

Commit 1: drop 3.10

  • Manifests. requires-python = ">=3.11, <4.0" in citry, citry-core, citry-lsp, citry-ui, pygments-citry, and the root project. The 3.10 classifiers are removed. uv.lock, the build-constraint pins (the tomli entry is gone), and the eight example locks are refreshed. The lock diffs only remove 3.10-only packages: exceptiongroup, tomli, backports-asyncio-runner, and the 3.10 rpds-py entry.
  • CI. The test, examples, diagnostic, and publish smoke matrices start at 3.11. The Linux cell that runs the Python render path and the macOS smoke pair move from 3.10 to 3.11. The citry-core builders and the Windows and macOS ABI3 smoke tests use 3.11.
  • tomli fallbacks removed. The scripts, validators, verifiers, release_links, the examples tooling, and citry's i18n package loader import tomllib directly. citry no longer depends on tomli.
  • Verifiers. The verifiers and Citry UI's wheel qualification expect Requires-Python >=3.11.
  • Docs.
    • The README, the install and compatibility pages, the package and example READMEs, docs/codebase.md, and two design docs list 3.11 through 3.14.
    • The compatibility page says 3.15 is not supported yet. pip still installs Citry on 3.15, but Citry is not tested there.
  • Changelogs. All five packages get an entry that says which release pip keeps installing on 3.10.
  • Ruff. target-version is pinned to py310. Ruff would otherwise follow requires-python, and the 3.11 lint and syntax changes belong to Use Python 3.11 features now that 3.10 is dropped #331.

Commit 2: abi3-py311

At the maintainer's request (file list from the PyO3 lane), the citry_core_py feature becomes abi3-py311, pointing at pyo3/abi3-py311, which PyO3 0.27 already provides. The GIL-enabled CPython wheels are now tagged cp311-abi3. maturin takes the tag from the lowest abi3-pyXY feature, so the tag follows the rename.

The workflows, verify_citry_core_distribution.py, the toolchain validator, their tests, and docs/codebase.md are updated to match. cargo check -p citry_core_py --features abi3-py311 and cargo fmt --check pass locally.

Left for #331

These comments now describe 3.10 workarounds that no longer apply:

  • citry_ui/quality/scenarios.py:11
  • citry/_caller_warnings.py:23
  • _vue/direct_capture.py:351
  • _vue/leaf_program.py:3145
  • citry_ui/components/_attrs.py:10,19 (the noqa)

These pieces of code only matter on 3.10:

  • the get_int_max_str_digits fallback in citry/util/html.py:206
  • the typing_extensions comment in docs_site/examples/recursion/component.py:11, which readers see on a docs page
  • feature_version=(3, 10) in docs_site/_internal/live_code.py:151
  • PythonVersion::PY310 in crates/citry_template_formatter/src/python.rs:63,72

Post-release step

The example and benchmark uv.lock files that pin published cp310-abi3 citry-core wheels stay as they are. Relock them once a cp311-abi3 citry-core is on PyPI.

For release prep (not changed here)

packages/py/citry_lsp/README.md says citry-lsp requires Citry 0.6.0, while its changelog says 0.7.0. The pyproject still says citry>=0.6.0; that minimum moves in the release PR.

Evidence

  • Independent adversarial review, docs cold read, and a separate prose pass, plus a delta review of the fixes and the abi3 commit. All findings are folded in.
  • Every non-cargo scripts/check.py --profile fast phase except pytest passed locally: uv lock, ruff, ruff format, mypy and mypy --platform linux, pyright, the Node checks, the protocol checks, and the validators.
  • 238 focused tests pass (distribution artifacts for every package, the release and CI-workflow tests, the toolchain and build-constraint validators, the examples).
  • Pytest not run locally: the worktree's compiled citry_core predates fix: decode static template references once, as Vue does #330's Rust change, so the full local pytest run fails on "unknown compiler identity" for reasons unrelated to this change. PR CI builds citry_core fresh and is the real check for pytest, the cargo phases, and the Python version matrix. I will post a local pytest result here once a fresh build is available.

🤖 Generated with Claude Code

JuroOravec and others added 2 commits October 24, 2026 18:27
Python 3.10 reached its end of life on 2026-10-01. Every package now
requires Python 3.11 or newer, and nothing tests on or installs on 3.10.

- requires-python is >=3.11 in citry, citry-core, citry-lsp, citry-ui,
  pygments-citry, and the root project; the 3.10 classifiers are gone.
  uv.lock, the build-constraint pins (no tomli entry), and the eight
  example locks are refreshed.
- CI: the test, examples, diagnostic, and publish smoke matrices start
  at 3.11. The Linux cell that runs the Python render path and the macOS
  smoke pair move from 3.10 to 3.11. The citry-core builders keep the
  abi3-py310 feature (moving it belongs with the PyO3 upgrade) but build
  with a 3.11 interpreter, and the Windows and macOS ABI3 smoke tests
  start at 3.11.
- The tomli fallbacks are removed: scripts, validators, verifiers,
  release_links, the examples tooling, and citry's i18n package loader
  import tomllib directly. citry no longer depends on tomli.
- The distribution verifiers and Citry UI's wheel qualification expect
  Requires-Python >=3.11.
- Docs, package READMEs, and example READMEs list 3.11 through 3.14;
  the compatibility page says 3.15 is not supported yet.
- Changelog entries in all five packages.

Using 3.11-only syntax and APIs, and the comments that explain 3.10
workarounds, are left to #331; ruff's target-version stays py310 for
that reason. Python 3.15 waits for the PyO3 upgrade.

Part of #177.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With Python 3.10 dropped, the citry_core_py feature becomes abi3-py311
(pointing at pyo3/abi3-py311, which PyO3 0.27 already offers), so the
GIL-enabled CPython wheels are tagged cp311-abi3 instead of cp310-abi3.
The publish and test workflows select the renamed feature and glob the
new wheel names, and the release verifier, the toolchain validator,
their tests, and docs/codebase.md follow.

The example and benchmark uv.lock files that pin published cp310-abi3
citry-core wheels stay as they are; they refresh after a cp311-abi3
release is on PyPI.

`cargo check -p citry_core_py --features abi3-py311` passes.

Part of #177.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@JuroOravec

Copy link
Copy Markdown
Member Author

Local evidence update: the full non-cargo gate now passes on this branch (ddd7537), using a citry_core built from main at 1b64f71.

  • Every non-cargo phase of scripts/check.py --profile fast passed: uv lock --check, ruff, ruff format, mypy and mypy --platform linux, pyright, the Node package checks, the protocol checks, pytest with reload servers, the main pytest phase (-m "not e2e" -n 4, about 17 minutes), Vue render parity, and the validators.
  • The cargo phases were left to PR CI, as before.

This was run on Python 3.14 on macOS, so the PR CI matrix is still the check for 3.11 through 3.13 and the other platforms.

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