Skip to content

Commit 522c916

Browse files
icemacCopilot
andcommitted
Build and test free-threaded Python on all platforms
- Expand 3.14t CI from Linux-only to all platforms (macOS, Windows) - Add 3.15t CI entries alongside 3.15 - Add cp314t/cp315t patterns to manylinux wheel builds - Fix 3.15-specific conditions to also match 3.15t (use startsWith) - Add py315t to tox envlist and pip_pre config - Remove duplicate py314t entry from tox envlist Fixes #374 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a98e17c commit 522c916

4 files changed

Lines changed: 39 additions & 8 deletions

File tree

.github/workflows/tests.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,16 @@ jobs:
106106
include:
107107
- python-version: "3.14t"
108108
os: ubuntu-latest
109+
- python-version: "3.14t"
110+
os: macos-latest
111+
- python-version: "3.14t"
112+
os: windows-latest
113+
- python-version: "3.15t"
114+
os: ubuntu-latest
115+
- python-version: "3.15t"
116+
os: macos-latest
117+
- python-version: "3.15t"
118+
os: windows-latest
109119

110120
steps:
111121
- name: checkout
@@ -151,12 +161,12 @@ jobs:
151161

152162

153163
- name: Install Build Dependencies (3.15)
154-
if: matrix.python-version == '3.15'
164+
if: startsWith(matrix.python-version, '3.15')
155165
run: |
156166
pip install -U pip
157167
pip install -U "setuptools >= 78.1.1,< 82" wheel twine cffi pycparser
158168
- name: Install Build Dependencies
159-
if: matrix.python-version != '3.15'
169+
if: ${{ !startsWith(matrix.python-version, '3.15') }}
160170
run: |
161171
pip install -U pip
162172
pip install -U "setuptools >= 78.1.1,< 82" wheel twine
@@ -205,14 +215,14 @@ jobs:
205215
python setup.py sdist
206216
207217
- name: Install zope.interface and dependencies (3.15)
208-
if: matrix.python-version == '3.15'
218+
if: startsWith(matrix.python-version, '3.15')
209219
run: |
210220
# Install to collect dependencies into the (pip) cache.
211221
# Use "--pre" here because dependencies with support for this future
212222
# Python release may only be available as pre-releases
213223
pip install --pre .[test]
214224
- name: Install zope.interface and dependencies
215-
if: matrix.python-version != '3.15'
225+
if: ${{ !startsWith(matrix.python-version, '3.15') }}
216226
run: |
217227
# Install to collect dependencies into the (pip) cache.
218228
pip install -U pip "setuptools >= 78.1.1,< 82"
@@ -288,6 +298,16 @@ jobs:
288298
include:
289299
- python-version: "3.14t"
290300
os: ubuntu-latest
301+
- python-version: "3.14t"
302+
os: macos-latest
303+
- python-version: "3.14t"
304+
os: windows-latest
305+
- python-version: "3.15t"
306+
os: ubuntu-latest
307+
- python-version: "3.15t"
308+
os: macos-latest
309+
- python-version: "3.15t"
310+
os: windows-latest
291311

292312
steps:
293313
- name: checkout

.manylinux-install.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ tox_env_map() {
3232
*"cp311"*) echo 'py311';;
3333
*"cp312"*) echo 'py312';;
3434
*"cp313"*) echo 'py313';;
35+
*"cp314t"*) echo 'py314t';;
3536
*"cp314"*) echo 'py314';;
37+
*"cp315t"*) echo 'py315t';;
3638
*"cp315"*) echo 'py315';;
3739
*) echo 'py';;
3840
esac
@@ -46,8 +48,10 @@ for PYBIN in /opt/python/*/bin; do
4648
[[ "${PYBIN}" == *"cp312/"* ]] || \
4749
[[ "${PYBIN}" == *"cp313/"* ]] || \
4850
[[ "${PYBIN}" == *"cp314/"* ]] || \
49-
[[ "${PYBIN}" == *"cp315/"* ]] ; then
50-
if [[ "${PYBIN}" == *"cp315/"* ]] ; then
51+
[[ "${PYBIN}" == *"cp314t/"* ]] || \
52+
[[ "${PYBIN}" == *"cp315/"* ]] || \
53+
[[ "${PYBIN}" == *"cp315t/"* ]] ; then
54+
if [[ "${PYBIN}" == *"cp315/"* ]] || [[ "${PYBIN}" == *"cp315t/"* ]] ; then
5155
"${PYBIN}/pip" install --pre -e /io/
5256
"${PYBIN}/pip" wheel /io/ --pre -w wheelhouse/
5357
else

CHANGES.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Change log
44
8.5 (unreleased)
55
----------------
66

7+
- Build and upload free-threaded (``cp314t``) wheels for all platforms.
8+
Expand CI testing for free-threaded Python 3.14t from Linux-only to all
9+
platforms (macOS, Windows), and add 3.15t CI.
10+
See `issue 374 <https://github.com/zopefoundation/zope.interface/issues/374>`_.
11+
712
- Replace all remaining ``PyDict_GetItem()`` calls in the C extension with
813
exception-safe alternatives (``PyDict_Contains``, ``PyDict_GetItemWithError``).
914
``PyDict_GetItem`` silently swallows exceptions from ``__hash__``/``__eq__``,

tox.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ envlist =
1212
py314,py314-pure
1313
py315,py315-pure
1414
py314t,py314t-pure
15+
py315t,py315t-pure
1516
pypy3
1617
docs
1718
coverage
18-
py314t,py314t-pure
1919

2020
[testenv]
21-
pip_pre = py315: true
21+
pip_pre =
22+
py315: true
23+
py315t: true
2224
deps =
2325
setuptools >= 78.1.1,< 82
2426
Sphinx

0 commit comments

Comments
 (0)