Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,39 @@ jobs:
- name: Tests
run: pytest

freethreading:
# The free-threaded build is officially supported since Python 3.14 (PEP 779).
# The plugin coordinates reruns between xdist workers over a socket server
# with a thread per connection, so run the suite without the GIL to make
# sure that shared state stays safe.
name: free-threading:py-3.14t:pytest-9.1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.14t"

- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install pytest==9.1.* pytest-xdist
python -m pip install -e .

- name: Verify the GIL stays disabled
# Importing an extension that does not declare free-threading support
# re-enables the GIL, which would make this job silently pointless.
run: |
python -c "
import sys, pytest, xdist, pytest_rerunfailures
assert not sys._is_gil_enabled(), 'importing the test dependencies re-enabled the GIL'
"

- name: Tests
run: pytest

platform:
# Test devel setup on different platforms.
name: Platform-${{ matrix.os }}
Expand Down
1 change: 1 addition & 0 deletions changes/361.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test the free-threaded Python 3.14 build in CI, via a new ``py314t`` tox environment and a matching workflow job.
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ envlist =
linting
py{310,311,312,313,314,py3}-pytest{82,83,84,90,91,main}
py314-pytest91-xdist
py314t-pytest91-xdist
docs
minversion = 4.0

Expand Down