Skip to content

ci: run the Python suite weekly on PyPy 3.11 and free-threaded CPython 3.14 - #475

Merged
JuroOravec merged 4 commits into
mainfrom
ci/alt-interpreters
Oct 28, 2026
Merged

JuroOravec merged 4 commits into
mainfrom
ci/alt-interpreters

Conversation

@JuroOravec

Copy link
Copy Markdown
Member

Closes #264. Merge after #474, which makes the suite pass on PyPy; otherwise the first weekly run fails.

What it adds

A new workflow, py--alt-interpreters.yml, runs the non-browser Python suite on PyPy 3.11 and free-threaded CPython 3.14 (3.14t). On those interpreters Citry renders through its Python render path, and their garbage collection, object identity and thread scheduling differ from standard CPython. So the per-PR matrix cannot show that Citry still works there.

  • When it runs: Mondays at 05:17 UTC and on demand (workflow_dispatch), never on pull requests. It adds nothing to routine CI or the release path.
  • What it runs: the same selection as the per-PR test cells: -m "not e2e and not qualification", without the server-reload file, with -n 4 --dist loadfile.
  • Diagnostics: -rfE prints the failure summary, and -o faulthandler_timeout=600 prints the stack of any test still running after 10 minutes. The first PyPy trial stopped at 99% and its runner was shut down before pytest printed its summary, so the log named no test.
  • The GIL: a "Show the interpreter" step prints whether the build is free-threaded and whether importing citry turned the GIL back on. On 3.14t it does, because citry_core declares it needs the GIL (Declare citry_core safe without the GIL (gil_used = false) #433). A second step on 3.14t runs the render, serialize, Events and thread tests with PYTHON_GIL=0. That step is report-only (continue-on-error) until Declare citry_core safe without the GIL (gil_used = false) #433 makes citry_core declare it is safe without the GIL.
  • Failure reports: when a scheduled run fails, one tracking issue is opened, or commented on if it is still open.
  • Build pins: Brotli has no wheel for 3.14t, so uv builds it from source, and require-build-hashes needs its build backend pinned. pkgconfig==1.6.0 is added to THIRD_PARTY_BUILD_REQUIREMENTS and the build constraints in the root pyproject.toml. docs/codebase.md is updated to match.

Trial results

The trial ran on this branch with a temporary push trigger, which is removed in this PR. Run 40540347775:

  • 3.14t passed. The full suite gave 13571 passed, 914 skipped, 1 xfailed in 12 minutes. The GIL was on after import citry, as expected. The PYTHON_GIL=0 step gave 2682 passed, 645 skipped, with no failures, so no Python-level race showed up.
  • PyPy 3.11 failed in that trial, before test: pass the Python suite on PyPy 3.11 #474. Reproduced locally, that was 45 failed, 13490 passed, 1039 skipped. test: pass the Python suite on PyPy 3.11 #474 fixes each failure and explains its cause. With test: pass the Python suite on PyPy 3.11 #474, the touched files give 609 passed, 297 skipped and 0 failed on PyPy. The 99% hang did not reproduce locally, and no test reached the 600 s faulthandler timeout, so it was most likely the runner.

The first run after merging is the real end-to-end check. Start it with gh workflow run py--alt-interpreters.yml once #474 is in.

Evidence

  • scripts/validate.py passes, including the build-constraint and toolchain checks. uv lock --check passes.
  • The workflow tests pass: test_ci_workflows, the release-security policy and the toolchain validator, 29 passed. This workflow has no pull_request trigger, so the PR-concurrency rule does not apply to it.
  • Cargo is left to CI.

🤖 Generated with Claude Code

JuroOravec and others added 4 commits October 27, 2026 20:48
The first PyPy trial stopped printing at 99% and its runner was shut
down before pytest printed the failure summary, so the log named no test.
-rfE prints the summary as failures happen to be collected, and
faulthandler_timeout prints the stack of any test still running after
ten minutes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@JuroOravec
JuroOravec merged commit 92d70ac into main Oct 28, 2026
37 of 41 checks passed
@JuroOravec
JuroOravec deleted the ci/alt-interpreters branch October 28, 2026 11:46
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.

Run the Python test suite on PyPy and free-threaded CPython

1 participant