Skip to content

Commit e9e7060

Browse files
clin1234indygreg
authored andcommitted
ci: add coverage for free-threaded Python
We add 3.13t and 3.14t into the matrix. For the wheels, we skip upload of free-threaded wheels for the moment because we don't yet want to officially declare free-threaded support. Closes #276.
1 parent e140f3f commit e9e7060

File tree

5 files changed

+22
-5
lines changed

5 files changed

+22
-5
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ jobs:
2222
- '3.11'
2323
- '3.12'
2424
- '3.13'
25+
- '3.13t'
2526
- '3.14'
27+
- '3.14t'
2628
arch:
2729
- 'arm64'
2830
- 'x86'
@@ -80,7 +82,7 @@ jobs:
8082
allow-prereleases: true
8183

8284
- name: Install Rust
83-
if: matrix.arch != 'x86' && matrix.py != '3.14'
85+
if: matrix.arch != 'x86' && (matrix.py != '3.14' || matrix.py != '3.14t')
8486
uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b # v1
8587
with:
8688
toolchain: stable
@@ -97,14 +99,14 @@ jobs:
9799
python -m pip install --require-hashes -r ci/requirements.txt
98100
99101
- name: Build (Rust)
100-
if: matrix.arch != 'x86' && matrix.py != '3.14'
102+
if: matrix.arch != 'x86' && (matrix.py != '3.14' || matrix.py != '3.14t')
101103
env:
102104
PIP_CONSTRAINT: 'ci/constraints.txt'
103105
run: |
104106
python -m pip -v install --config-settings='--build-option=--rust-backend' -e .
105107
106108
- name: Build (No Rust)
107-
if: matrix.arch == 'x86' || matrix.py == '3.14'
109+
if: matrix.arch == 'x86' || matrix.py == '3.14' || matrix.py == '3.14t'
108110
env:
109111
PIP_CONSTRAINT: 'ci/constraints.txt'
110112
run: |
@@ -115,13 +117,14 @@ jobs:
115117
pytest --numprocesses=auto --hypothesis-profile=${HYPOTHESIS_PROFILE} -v tests/
116118
117119
- name: Test CFFI Backend
120+
if: matrix.py != '3.13t'
118121
env:
119122
PYTHON_ZSTANDARD_IMPORT_POLICY: 'cffi'
120123
run: |
121124
pytest --numprocesses=auto --hypothesis-profile=${HYPOTHESIS_PROFILE} -v tests/
122125
123126
- name: Test Rust Backend
124-
if: matrix.arch != 'x86' && matrix.py != '3.14'
127+
if: matrix.arch != 'x86' && (matrix.py != '3.14' || matrix.py != '3.14t' )
125128
# Rust backend is currently experimental. So ignore failures in it.
126129
continue-on-error: true
127130
env:

.github/workflows/typing.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ jobs:
1515
- '3.11'
1616
- '3.12'
1717
- '3.13'
18+
- '3.13t'
1819
- '3.14'
20+
- '3.14t'
1921
runs-on: 'ubuntu-24.04'
2022
steps:
2123
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

.github/workflows/wheel.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ jobs:
2929
- 'cp311-cp311'
3030
- 'cp312-cp312'
3131
- 'cp313-cp313'
32+
- 'cp313-cp313t'
3233
- 'cp314-cp314'
34+
- 'cp314-cp314t'
3335
exclude:
3436
- image: 'musllinux_1_1_aarch64'
3537
py: 'cp314-cp314'
@@ -50,6 +52,7 @@ jobs:
5052
docker run -e PYPATH=/opt/python/${{ matrix.py }} -e ZSTD_WARNINGS_AS_ERRORS=1 --rm -v `pwd`:/project quay.io/pypa/${{ matrix.image }} /project/ci/build-manylinux-wheel.sh
5153
5254
- name: Upload Wheel
55+
if: ${{ !endsWith(matrix.py, 't') }}
5356
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5457
with:
5558
name: linux-${{ matrix.py }}-${{ matrix.image }}
@@ -65,7 +68,9 @@ jobs:
6568
- 'cp311'
6669
- 'cp312'
6770
- 'cp313'
71+
- 'cp313t'
6872
- 'cp314'
73+
- 'cp314t'
6974
arch:
7075
- 'arm64'
7176
- 'x86_64'
@@ -75,6 +80,7 @@ jobs:
7580
CIBW_BUILD: ${{ matrix.py }}-*
7681
CIBW_BUILD_VERBOSITY: '1'
7782
ZSTD_WARNINGS_AS_ERRORS: '1'
83+
7884
steps:
7985
- name: Set up Python
8086
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
@@ -94,6 +100,7 @@ jobs:
94100
cibuildwheel --output-dir dist
95101
96102
- name: Upload Wheel
103+
if: ${{ !endsWith(matrix.py, 't') }}
97104
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
98105
with:
99106
name: macos-${{ matrix.py }}-${{ matrix.arch }}
@@ -109,7 +116,9 @@ jobs:
109116
- '3.11'
110117
- '3.12'
111118
- '3.13'
119+
- '3.13t'
112120
- '3.14'
121+
- '3.14t'
113122
arch:
114123
- 'x86'
115124
- 'x64'
@@ -141,6 +150,7 @@ jobs:
141150
python -m pip wheel -w dist .
142151
143152
- name: Upload Wheel
153+
if: ${{ !endsWith(matrix.py, 't') }}
144154
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
145155
with:
146156
name: windows-${{ matrix.py }}-${{ matrix.arch }}

docs/news.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Version History
1616
(#274)
1717
* The cffi backend is now automatically disabled for nogil builds on Python
1818
<3.14, as cffi didn't implement nogil support until the 2.0 release. (#274)
19+
* Added CI coverage for free-threaded CPython 3.13 and 3.14. We do not yet
20+
formally support free-threaded builds. (#276)
1921

2022
0.24.0 (released 2025-08-17)
2123
============================

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ line-length = 80
5050
select = ["E4", "E7", "E9", "F", "I"]
5151

5252
[tool.cibuildwheel]
53-
enable = ["cpython-prerelease"]
53+
enable = ["cpython-freethreading", "cpython-prerelease"]
5454

5555
# This is needed to suppress generation of license-file, which isn't
5656
# compatible with metadata version 2.1, which our pinned setuptools

0 commit comments

Comments
 (0)