From 0c3e44b994299c48dc7c5a5fb8c1c775e8c05b94 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Le Borgne Date: Fri, 16 Oct 2026 22:56:25 +0100 Subject: [PATCH 1/2] ci: test free-threaded builds on free-threaded Python 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 Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b4019757..fef731f2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -70,6 +70,10 @@ jobs: HYPOTHESIS_PROFILE: 'ci' # Activate Python development mode so we get warnings. PYTHONDEVMODE: '1' + # Make uv use the Python installed by setup-python. uv only uses a + # free-threaded interpreter when explicitly requested, and would otherwise + # silently fall back to a GIL-enabled Python found on the system. + UV_PYTHON: ${{ matrix.py }} steps: - name: Set up Python uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 From a257b061bfb27ed49ee09746fcb1530c8aa50808 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Le Borgne Date: Fri, 16 Oct 2026 22:56:25 +0100 Subject: [PATCH 2/2] ci: run mypy on each Python version of the matrix 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 Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN --- .github/workflows/typing.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/typing.yml b/.github/workflows/typing.yml index 35786201..1555a8ee 100644 --- a/.github/workflows/typing.yml +++ b/.github/workflows/typing.yml @@ -23,7 +23,17 @@ jobs: - '3.14' - '3.14t' runs-on: 'ubuntu-24.04' + env: + # Make uv use the Python installed by setup-python instead of the + # system Python. + UV_PYTHON: ${{ matrix.py }} steps: + - name: Set up Python + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + with: + python-version: ${{ matrix.py }} + allow-prereleases: true + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false