Skip to content

build: support Python 3.15 - #435

Merged
JuroOravec merged 1 commit into
mainfrom
py/python-3.15
Oct 27, 2026
Merged

JuroOravec merged 1 commit into
mainfrom
py/python-3.15

Conversation

@JuroOravec

Copy link
Copy Markdown
Member

Closes #177. citry-core builds on 3.15 since #340; this PR adds the rest.

What changes

  • Classifiers. All five packages list Python 3.15.

  • Test matrix. py--tests.yml gains Ubuntu and Windows 3.15 jobs. The macOS pair becomes 3.11 and 3.15.

  • Other install tests. The Citry UI wheel install check runs on 3.11 and 3.15. The citry, citry-lsp, citry-ui and pygments-citry release install tests add 3.15, and the diagnostic workflow offers it.

  • citry-core release. It installs and tests the ABI3 wheel on 3.15. It also builds a free-threaded cp315t wheel for every Linux and musllinux architecture, next to cp314t.

    • The release set grows from 36 to 46 files.
    • verify_citry_core_distribution.py, its test, the toolchain validator and docs/codebase.md change to match.
  • uv.lock. Only packages that a 3.15 test job installs and that lack a cp315 wheel move:

    • markupsafe 3.0.4;
    • pydantic 2.14.1 with pydantic-core 2.50.1;
    • typing-extensions 4.16.0 and typing-inspection 0.4.4, which pydantic 2.14.1 requires.

    tzdata, pygments and everything else stay where they were.

  • PyYAML has no wheel for 3.15 or PyPy, so it builds from source with Cython. Two kinds of tests read YAML with it: the citry-ui tests and the repository's workflow tests. require-build-hashes refused that build, because Cython was not pinned.

    • scripts/build_constraints.py now also pins THIRD_PARTY_BUILD_REQUIREMENTS (Cython 3.3.0).
    • docs/codebase.md says how to add another entry.
    • With an empty cache and the repo's own build rules, PyYAML now builds from source on CPython 3.15.1 and PyPy 3.11.17.
  • djc-core and minify-html need nothing. No test job installs them. djc-core comes from django-components in citry's benchmark group, which no workflow selects. minify-html is only in the root docs extra.

  • Docs. The README, the package READMEs, and the installation, compatibility and development pages say 3.11 through 3.15. The compatibility page also says that on a free-threaded build, importing citry-core turns the GIL back on for now (Declare citry_core safe without the GIL (gil_used = false) #433). Each package's changelog gains an entry.

Proof of the cp315t build on CI

The release workflow's qualify mode only runs from main: verify-version checks GITHUB_REF == refs/heads/main. So no dry run can build release wheels from a branch.

Instead, a temporary trial workflow on a separate, unmerged branch ran the same maturin-action step with the same arguments as the release, --interpreter python3.14t python3.15t pypy3.11. That branch has since been deleted.

Left out on purpose

  • Example projects still test on 3.11 and 3.14. Their lockfiles pin the released Citry and markupsafe 3.0.3, which has no cp315 wheel, so moving them needs their own relock.

Local evidence

  • Non-cargo phases of scripts/check.py --profile fast, run by a helper agent with a timeout: every phase passes except two pytest tests.
    • test_vue_hydration_regions.py::test_a_v_pre_elements_colon_attribute_is_written_on_the_server fails because the local citry_core is older than main's Rust.
    • test_citry_ui_type_check.py::test_citry_ui_components_have_no_typescript_or_ty_findings reports a ty redundant-condition ... <special-form 'typing.Any'>. The same failure happens locally on current main with main's lockfile versions, so it doesn't come from this PR; it is being looked into separately.
  • Deselected locally because the stale build crashes the interpreter (SIGILL); CI runs them:
    • test_native_render_leaf_json.py
    • test_vue_hydration_regions.py::test_a_deep_template_renders_on_a_thread_with_a_small_stack
  • Left to PR CI: the cargo phases. The 3.15 jobs prove the suite on 3.15 itself.
  • Other checks: supported_versions.py check reports the versions in sync, and all validators pass.

🤖 Generated with Claude Code

The rest of #177, now that citry-core builds on 3.15 (#340).

- All five packages list Python 3.15 in their classifiers.
- The Python test matrix gains Ubuntu and Windows 3.15 jobs, and the
  macOS pair becomes 3.11 and 3.15. The Citry UI wheel install check now
  runs on 3.11 and 3.15, the citry, citry-lsp, citry-ui and
  pygments-citry release install tests run on 3.15 too, and the
  diagnostic workflow offers it.
- The citry-core release now installs and tests its ABI3 wheel on 3.15
  (on Linux and Windows next to 3.11-3.14, and as the newest on macOS),
  and builds a free-threaded cp315t wheel for every Linux and musllinux
  architecture next to cp314t. The release set grows from 36 to 46
  files; the verifier, its test, the toolchain validator and
  docs/codebase.md move with it.
- uv.lock moves only what a 3.15 test job installs and has no cp315
  wheel for: markupsafe 3.0.4, and pydantic 2.14.1 with pydantic-core
  2.50.1 (pydantic 2.14.1 needs typing-extensions 4.16.0 and
  typing-inspection 0.4.4). tzdata, pygments and everything else stay.
- PyYAML, which the citry-ui tests and the repository workflow tests
  read manifests with, has no wheel for 3.15 (or PyPy) and builds from
  its sdist with Cython. require-build-hashes refused that build, so
  scripts/build_constraints.py now also pins the backends in
  THIRD_PARTY_BUILD_REQUIREMENTS (Cython 3.3.0), and docs/codebase.md
  says how to add another one. A source build of PyYAML on CPython 3.15.1
  and PyPy 3.11.17 with an empty cache passes with the pin.
- django-components (and its djc-core) is in citry's `benchmark` group,
  and minify-html in the root `docs` extra; no test job installs either,
  so neither needs a 3.15 wheel.
- The README, the package READMEs, the installation and compatibility
  pages, the development page, and docs/codebase.md say 3.11 through
  3.15, and each package's changelog says it supports 3.15.

The example projects keep testing on 3.11 and 3.14: their lockfiles pin
the released Citry and markupsafe 3.0.3, which has no cp315 wheel, so
moving them needs their own relock and is left for a follow-up.

Closes #177

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@JuroOravec
JuroOravec merged commit d6c2405 into main Oct 27, 2026
22 of 36 checks passed
@JuroOravec
JuroOravec deleted the py/python-3.15 branch October 27, 2026 13:15
JuroOravec added a commit that referenced this pull request Oct 28, 2026
A PR merged while its checks were still queued kept those runs, and
they ran in full after the merge: about 300 to 400 job-minutes each for
#430, #435, #436 and #437, while the merge's own run on main tested the
same change again. Every check workflow that runs on pull requests now
also starts on the PR's `closed` event. That run joins the PR's
concurrency group, whose cancel-in-progress cancels the PR's queued and
running checks, and every job skips on that event, so the cancelling run
itself needs no runner.

The notification and relock workflows are left out because they run no
checks. A test checks each check workflow's trigger types and that every
job that can start a run skips on `closed`.

This is step 1 of the #405 proposal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

Supported Python versions need updating

1 participant