Skip to content

Commit d9a4714

Browse files
add free-threading CI for Python 3.14 (#11466)
Co-authored-by: J. Nick Koston <[email protected]>
1 parent a3f033a commit d9a4714

File tree

10 files changed

+346
-21
lines changed

10 files changed

+346
-21
lines changed

.github/workflows/ci-cd.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ jobs:
156156
pyver: "3.14"
157157
experimental: true
158158
no-extensions: 'Y'
159+
- os: ubuntu
160+
pyver: "3.14t"
161+
experimental: true
159162
fail-fast: true
160163
runs-on: ${{ matrix.os }}-latest
161164
continue-on-error: ${{ matrix.experimental }}
@@ -186,8 +189,13 @@ jobs:
186189
run: |
187190
python -m pip install -U pip wheel setuptools build twine
188191
- name: Install dependencies
192+
env:
193+
DEPENDENCY_GROUP: test${{ endsWith(matrix.pyver, 't') && '-ft' || '' }}
189194
run: |
190-
python -m pip install -r requirements/test.in -c requirements/test.txt
195+
python -Im pip install -r requirements/${{ env.DEPENDENCY_GROUP }}.in -c requirements/${{ env.DEPENDENCY_GROUP }}.txt
196+
- name: Set PYTHON_GIL=0 for free-threading builds
197+
if: ${{ endsWith(matrix.pyver, 't') }}
198+
run: echo "PYTHON_GIL=0" >> $GITHUB_ENV
191199
- name: Restore llhttp generated files
192200
if: ${{ matrix.no-extensions == '' }}
193201
uses: actions/download-artifact@v5

CHANGES/11466.contrib.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added free-threading CI job for CPython 3.14 -- by :user:`kumaraditya303`.

requirements/base-ft.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-r runtime-deps.in
2+
3+
gunicorn

requirements/base-ft.txt

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.10
3+
# by the following command:
4+
#
5+
# pip-compile --allow-unsafe --output-file=requirements/base-ft.txt --strip-extras requirements/base-ft.in
6+
#
7+
aiodns==3.5.0
8+
# via -r requirements/runtime-deps.in
9+
aiohappyeyeballs==2.6.1
10+
# via -r requirements/runtime-deps.in
11+
aiosignal==1.4.0
12+
# via -r requirements/runtime-deps.in
13+
async-timeout==5.0.1 ; python_version < "3.11"
14+
# via -r requirements/runtime-deps.in
15+
brotli==1.1.0 ; platform_python_implementation == "CPython"
16+
# via -r requirements/runtime-deps.in
17+
cffi==2.0.0
18+
# via pycares
19+
frozenlist==1.7.0
20+
# via
21+
# -r requirements/runtime-deps.in
22+
# aiosignal
23+
gunicorn==23.0.0
24+
# via -r requirements/base-ft.in
25+
idna==3.10
26+
# via yarl
27+
multidict==6.6.4
28+
# via
29+
# -r requirements/runtime-deps.in
30+
# yarl
31+
packaging==25.0
32+
# via gunicorn
33+
propcache==0.3.2
34+
# via
35+
# -r requirements/runtime-deps.in
36+
# yarl
37+
pycares==4.11.0
38+
# via aiodns
39+
pycparser==2.23
40+
# via cffi
41+
typing-extensions==4.15.0
42+
# via
43+
# aiosignal
44+
# multidict
45+
yarl==1.20.1
46+
# via -r requirements/runtime-deps.in
47+
zstandard==0.25.0 ; platform_python_implementation == "CPython" and python_version < "3.14"
48+
# via -r requirements/runtime-deps.in

requirements/test-common.in

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
blockbuster
2+
coverage
3+
freezegun
4+
isal; python_version < "3.14" # no wheel for 3.14
5+
mypy; implementation_name == "cpython"
6+
pkgconfig
7+
proxy.py >= 2.4.4rc5
8+
pytest
9+
pytest-cov
10+
pytest-mock
11+
pytest-xdist
12+
pytest_codspeed
13+
python-on-whales
14+
setuptools-git
15+
trustme; platform_machine != "i686" # no 32-bit wheels
16+
wait-for-it
17+
zlib_ng

requirements/test-common.txt

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.10
3+
# by the following command:
4+
#
5+
# pip-compile --allow-unsafe --output-file=requirements/test-common.txt --strip-extras requirements/test-common.in
6+
#
7+
annotated-types==0.7.0
8+
# via pydantic
9+
blockbuster==1.5.25
10+
# via -r requirements/test-common.in
11+
cffi==2.0.0
12+
# via
13+
# cryptography
14+
# pytest-codspeed
15+
click==8.2.1
16+
# via wait-for-it
17+
coverage==7.10.6
18+
# via
19+
# -r requirements/test-common.in
20+
# pytest-cov
21+
cryptography==46.0.1
22+
# via trustme
23+
exceptiongroup==1.3.0
24+
# via pytest
25+
execnet==2.1.1
26+
# via pytest-xdist
27+
forbiddenfruit==0.1.4
28+
# via blockbuster
29+
freezegun==1.5.5
30+
# via -r requirements/test-common.in
31+
idna==3.10
32+
# via trustme
33+
iniconfig==2.1.0
34+
# via pytest
35+
isal==1.8.0 ; python_version < "3.14"
36+
# via -r requirements/test-common.in
37+
markdown-it-py==4.0.0
38+
# via rich
39+
mdurl==0.1.2
40+
# via markdown-it-py
41+
mypy==1.18.1 ; implementation_name == "cpython"
42+
# via -r requirements/test-common.in
43+
mypy-extensions==1.1.0
44+
# via mypy
45+
packaging==25.0
46+
# via pytest
47+
pathspec==0.12.1
48+
# via mypy
49+
pkgconfig==1.5.5
50+
# via -r requirements/test-common.in
51+
pluggy==1.6.0
52+
# via
53+
# pytest
54+
# pytest-cov
55+
proxy-py==2.4.10
56+
# via -r requirements/test-common.in
57+
pycparser==2.23
58+
# via cffi
59+
pydantic==2.12.0a1
60+
# via python-on-whales
61+
pydantic-core==2.37.2
62+
# via pydantic
63+
pygments==2.19.2
64+
# via
65+
# pytest
66+
# rich
67+
pytest==8.4.2
68+
# via
69+
# -r requirements/test-common.in
70+
# pytest-codspeed
71+
# pytest-cov
72+
# pytest-mock
73+
# pytest-xdist
74+
pytest-codspeed==4.0.0
75+
# via -r requirements/test-common.in
76+
pytest-cov==7.0.0
77+
# via -r requirements/test-common.in
78+
pytest-mock==3.15.1
79+
# via -r requirements/test-common.in
80+
pytest-xdist==3.8.0
81+
# via -r requirements/test-common.in
82+
python-dateutil==2.9.0.post0
83+
# via freezegun
84+
python-on-whales==0.78.0
85+
# via -r requirements/test-common.in
86+
rich==14.1.0
87+
# via pytest-codspeed
88+
setuptools-git==1.2
89+
# via -r requirements/test-common.in
90+
six==1.17.0
91+
# via python-dateutil
92+
tomli==2.2.1
93+
# via
94+
# coverage
95+
# mypy
96+
# pytest
97+
trustme==1.2.1 ; platform_machine != "i686"
98+
# via -r requirements/test-common.in
99+
typing-extensions==4.15.0
100+
# via
101+
# cryptography
102+
# exceptiongroup
103+
# mypy
104+
# pydantic
105+
# pydantic-core
106+
# python-on-whales
107+
# typing-inspection
108+
typing-inspection==0.4.1
109+
# via pydantic
110+
wait-for-it==2.3.0
111+
# via -r requirements/test-common.in
112+
zlib-ng==1.0.0
113+
# via -r requirements/test-common.in

requirements/test-ft.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-r base-ft.in
2+
-r test-common.in

requirements/test-ft.txt

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.10
3+
# by the following command:
4+
#
5+
# pip-compile --allow-unsafe --output-file=requirements/test-ft.txt --strip-extras requirements/test-ft.in
6+
#
7+
aiodns==3.5.0
8+
# via -r requirements/runtime-deps.in
9+
aiohappyeyeballs==2.6.1
10+
# via -r requirements/runtime-deps.in
11+
aiosignal==1.4.0
12+
# via -r requirements/runtime-deps.in
13+
annotated-types==0.7.0
14+
# via pydantic
15+
async-timeout==5.0.1 ; python_version < "3.11"
16+
# via -r requirements/runtime-deps.in
17+
blockbuster==1.5.25
18+
# via -r requirements/test-common.in
19+
brotli==1.1.0 ; platform_python_implementation == "CPython"
20+
# via -r requirements/runtime-deps.in
21+
cffi==2.0.0
22+
# via
23+
# cryptography
24+
# pycares
25+
# pytest-codspeed
26+
click==8.2.1
27+
# via wait-for-it
28+
coverage==7.10.6
29+
# via
30+
# -r requirements/test-common.in
31+
# pytest-cov
32+
cryptography==46.0.1
33+
# via trustme
34+
exceptiongroup==1.3.0
35+
# via pytest
36+
execnet==2.1.1
37+
# via pytest-xdist
38+
forbiddenfruit==0.1.4
39+
# via blockbuster
40+
freezegun==1.5.5
41+
# via -r requirements/test-common.in
42+
frozenlist==1.7.0
43+
# via
44+
# -r requirements/runtime-deps.in
45+
# aiosignal
46+
gunicorn==23.0.0
47+
# via -r requirements/base-ft.in
48+
idna==3.10
49+
# via
50+
# trustme
51+
# yarl
52+
iniconfig==2.1.0
53+
# via pytest
54+
isal==1.8.0 ; python_version < "3.14"
55+
# via -r requirements/test-common.in
56+
markdown-it-py==4.0.0
57+
# via rich
58+
mdurl==0.1.2
59+
# via markdown-it-py
60+
multidict==6.6.4
61+
# via
62+
# -r requirements/runtime-deps.in
63+
# yarl
64+
mypy==1.18.1 ; implementation_name == "cpython"
65+
# via -r requirements/test-common.in
66+
mypy-extensions==1.1.0
67+
# via mypy
68+
packaging==25.0
69+
# via
70+
# gunicorn
71+
# pytest
72+
pathspec==0.12.1
73+
# via mypy
74+
pkgconfig==1.5.5
75+
# via -r requirements/test-common.in
76+
pluggy==1.6.0
77+
# via
78+
# pytest
79+
# pytest-cov
80+
propcache==0.3.2
81+
# via
82+
# -r requirements/runtime-deps.in
83+
# yarl
84+
proxy-py==2.4.10
85+
# via -r requirements/test-common.in
86+
pycares==4.11.0
87+
# via aiodns
88+
pycparser==2.23
89+
# via cffi
90+
pydantic==2.12.0a1
91+
# via python-on-whales
92+
pydantic-core==2.37.2
93+
# via pydantic
94+
pygments==2.19.2
95+
# via
96+
# pytest
97+
# rich
98+
pytest==8.4.2
99+
# via
100+
# -r requirements/test-common.in
101+
# pytest-codspeed
102+
# pytest-cov
103+
# pytest-mock
104+
# pytest-xdist
105+
pytest-codspeed==4.0.0
106+
# via -r requirements/test-common.in
107+
pytest-cov==7.0.0
108+
# via -r requirements/test-common.in
109+
pytest-mock==3.15.1
110+
# via -r requirements/test-common.in
111+
pytest-xdist==3.8.0
112+
# via -r requirements/test-common.in
113+
python-dateutil==2.9.0.post0
114+
# via freezegun
115+
python-on-whales==0.78.0
116+
# via -r requirements/test-common.in
117+
rich==14.1.0
118+
# via pytest-codspeed
119+
setuptools-git==1.2
120+
# via -r requirements/test-common.in
121+
six==1.17.0
122+
# via python-dateutil
123+
tomli==2.2.1
124+
# via
125+
# coverage
126+
# mypy
127+
# pytest
128+
trustme==1.2.1 ; platform_machine != "i686"
129+
# via -r requirements/test-common.in
130+
typing-extensions==4.15.0
131+
# via
132+
# aiosignal
133+
# cryptography
134+
# exceptiongroup
135+
# multidict
136+
# mypy
137+
# pydantic
138+
# pydantic-core
139+
# python-on-whales
140+
# typing-inspection
141+
typing-inspection==0.4.1
142+
# via pydantic
143+
wait-for-it==2.3.0
144+
# via -r requirements/test-common.in
145+
yarl==1.20.1
146+
# via -r requirements/runtime-deps.in
147+
zlib-ng==1.0.0
148+
# via -r requirements/test-common.in
149+
zstandard==0.25.0 ; platform_python_implementation == "CPython" and python_version < "3.14"
150+
# via -r requirements/runtime-deps.in

requirements/test.in

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,2 @@
11
-r base.in
2-
3-
blockbuster
4-
coverage
5-
freezegun
6-
isal; python_version < "3.14" # no wheel for 3.14
7-
mypy; implementation_name == "cpython"
8-
pkgconfig
9-
proxy.py >= 2.4.4rc5
10-
pytest
11-
pytest-cov
12-
pytest-mock
13-
pytest-xdist
14-
pytest_codspeed
15-
python-on-whales
16-
setuptools-git
17-
trustme; platform_machine != "i686" # no 32-bit wheels
18-
wait-for-it
19-
zlib_ng
2+
-r test-common.in

requirements/test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ pycares==4.11.0
8787
# via aiodns
8888
pycparser==2.23
8989
# via cffi
90-
pydantic==2.11.9
90+
pydantic==2.12.0a1
9191
# via python-on-whales
92-
pydantic-core==2.33.2
92+
pydantic-core==2.37.2
9393
# via pydantic
9494
pygments==2.19.2
9595
# via

0 commit comments

Comments
 (0)