Skip to content

ci: run the free-threaded and typing jobs on the matrix's Python - #360

Open
pylaterreur wants to merge 2 commits into
indygreg:mainfrom
pylaterreur:ci-free-threaded-interpreters
Open

pylaterreur wants to merge 2 commits into
indygreg:mainfrom
pylaterreur:ci-free-threaded-interpreters

Conversation

@pylaterreur

@pylaterreur pylaterreur commented Oct 16, 2026 •

Copy link
Copy Markdown

The free-threaded test jobs and the typing jobs don't run on the Python they're named after.

test.yml. uv 0.8.11, the pinned version, only uses a free-threaded interpreter when one is requested explicitly (e.g. 3.14t; uv 0.9 relaxed this for 3.14+). uv run only requests >=3.10 from requires-python. So in the t jobs, uv skips the interpreter that setup-python installed:

DEBUG Skipping interpreter at `/opt/hostedtoolcache/Python/3.14.8/x64-freethreaded/bin/python3` from first executable in the search path: does not satisfy request `>=3.10`
Using CPython 3.12.3 interpreter at: /usr/bin/python3

None of the 14 t jobs in main's scheduled run 38940387418 used a free-threaded interpreter:

jobs interpreter uv used instead
ubuntu-24.04 and ubuntu-24.04-arm, 3.13t and 3.14t /usr/bin/python3 (3.12.3)
macos-26, 3.13t and 3.14t /opt/homebrew/opt/python@3.15/bin/python3.15 (3.15.0)
macos-26-intel, 3.13t / 3.14t /usr/local/bin/python3 (3.13.16 / 3.14.8)
windows-2022 (x64 and x86), 3.13t and 3.14t ...\Python\3.12.10\x64\python3.exe
windows-11-arm, 3.13t and 3.14t ...\Python\3.13.16\arm64\python3.exe

With UV_PYTHON set to the matrix version, uv uses the interpreter installed by setup-python. The other jobs already end up on that interpreter, and this keeps them there.

typing.yml. The workflow has no setup-python step and never passes matrix.py to uv. All 7 mypy jobs therefore run on the runner's /usr/bin/python3 (3.12.3) (run 38941189455). Like test.yml, it now installs the matrix version with setup-python and sets UV_PYTHON.

This also affects the 3.15t jobs that #357 adds: its fork run of test (ubuntu-24.04, 3.15t, x64) ran on /usr/bin/python3 (3.12.3).

Testing. I ran this branch on my fork:

  • test.yml: all 14 t jobs now run on python3.13t/python3.14t (Linux x64/arm64, macOS arm64/x64, Windows x64/x86/arm64).
    • The C backend passes in all of them (292 passed), and the CFFI backend passes on 3.14t (266 passed, 26 skipped).
    • The Rust step still has its known test_optimize failure.
    • The one failed job, macos-26-intel, 3.10, ran into hypothesis's 20 s deadline in a fuzzing test. That also happens on main (scheduled run 38780348047), and ci: fix the anaconda, wheel, external-zstd and flaky test workflows #358 removes that deadline.
  • typing.yml: every job runs mypy on its matrix Python, from 3.10.22 to 3.14.8 including python3.13t and python3.14t. All 7 pass.

I also reproduced the problem locally with uv 0.8.11 and GitHub's 3.15.0t build first on PATH. uv run --locked picks /usr/bin/python3 (Py_GIL_DISABLED = 0). With UV_PYTHON=3.15t, it picks python3.15t (Py_GIL_DISABLED = 1). zizmor 1.31.1 (offline audits) and actionlint report nothing.

Prepared with the help of Claude Code.

🤖 Generated with Claude Code

pylaterreur and others added 2 commits October 16, 2026 23:18
uv 0.8.11 only uses a free-threaded interpreter when one is explicitly
requested. `uv run` requests `>=3.10` from `requires-python`, so in the
3.13t and 3.14t jobs uv skips the interpreter installed by setup-python
and runs the tests on the next GIL-enabled Python it finds on the
runner, e.g. /usr/bin/python3 (3.12.3) on Ubuntu or the preinstalled
3.12.10 on Windows. Set UV_PYTHON to the matrix version so that every job
uses the interpreter installed by setup-python.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
The typing workflow never used matrix.py: it has no setup-python step and
uv gets no Python request, so every job ran mypy on the runner's system
Python 3.12.3. Install the matrix version with setup-python and point uv
at it, as in the test workflow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
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