@@ -103,6 +103,7 @@ jobs:
103103 - " 3.11"
104104 - " 3.12"
105105 - " 3.13"
106+ - " 3.14"
106107 os : [ubuntu-latest, macos-latest, windows-latest]
107108 exclude :
108109 - os : macos-latest
@@ -152,10 +153,16 @@ jobs:
152153 restore-keys : |
153154 ${{ runner.os }}-pip-
154155
156+ - name : Install Build Dependencies (3.14)
157+ if : matrix.python-version == '3.14'
158+ run : |
159+ pip install -U pip
160+ pip install -U "setuptools < 74" wheel twine
155161 - name : Install Build Dependencies
162+ if : matrix.python-version != '3.14'
156163 run : |
157164 pip install -U pip
158- pip install -U "setuptools <74" wheel twine
165+ pip install -U "setuptools < 74" wheel twine
159166
160167 - name : Build ExtensionClass (macOS x86_64)
161168 if : >
@@ -193,7 +200,15 @@ jobs:
193200 python setup.py build_ext -i
194201 python setup.py bdist_wheel
195202
203+ - name : Install ExtensionClass and dependencies (3.14)
204+ if : matrix.python-version == '3.14'
205+ run : |
206+ # Install to collect dependencies into the (pip) cache.
207+ # Use "--pre" here because dependencies with support for this future
208+ # Python release may only be available as pre-releases
209+ pip install --pre .[test]
196210 - name : Install ExtensionClass and dependencies
211+ if : matrix.python-version != '3.14'
197212 run : |
198213 # Install to collect dependencies into the (pip) cache.
199214 pip install .[test]
@@ -236,6 +251,7 @@ jobs:
236251 && startsWith(github.ref, 'refs/tags')
237252 && !startsWith(runner.os, 'Linux')
238253 && !startsWith(matrix.python-version, 'pypy')
254+ && !startsWith(matrix.python-version, '3.14')
239255 env :
240256 TWINE_PASSWORD : ${{ secrets.TWINE_PASSWORD }}
241257 run : |
@@ -255,6 +271,7 @@ jobs:
255271 - " 3.11"
256272 - " 3.12"
257273 - " 3.13"
274+ - " 3.14"
258275 os : [ubuntu-latest, macos-latest, windows-latest]
259276 exclude :
260277 - os : macos-latest
@@ -309,9 +326,24 @@ jobs:
309326 with :
310327 name : ExtensionClass-${{ runner.os }}-${{ matrix.python-version }}.whl
311328 path : dist/
329+ - name : Install ExtensionClass ${{ matrix.python-version }}
330+ if : matrix.python-version == '3.14'
331+ run : |
332+ pip install -U wheel "setuptools < 74"
333+ # coverage might have a wheel on PyPI for a future python version which is
334+ # not ABI compatible with the current one, so build it from sdist:
335+ pip install -U --no-binary :all: coverage[toml]
336+ # Unzip into src/ so that testrunner can find the .so files
337+ # when we ask it to load tests from that directory. This
338+ # might also save some build time?
339+ unzip -n dist/ExtensionClass-*whl -d src
340+ # Use "--pre" here because dependencies with support for this future
341+ # Python release may only be available as pre-releases
342+ pip install --pre -e .[test]
312343 - name : Install ExtensionClass
344+ if : matrix.python-version != '3.14'
313345 run : |
314- pip install -U wheel "setuptools <74"
346+ pip install -U wheel "setuptools < 74"
315347 pip install -U coverage[toml]
316348 pip install -U 'cffi; platform_python_implementation == "CPython"'
317349 # Unzip into src/ so that testrunner can find the .so files
@@ -436,6 +468,8 @@ jobs:
436468 name : manylinux_${{ matrix.image }}_wheels.zip
437469 - name : Restore pip cache permissions
438470 run : sudo chown -R $(whoami) ${{ steps.pip-cache-default.outputs.dir }}
471+ - name : Prevent publishing wheels for unreleased Python versions
472+ run : VER=$(echo '3.14' | tr -d .) && ls -al wheelhouse && sudo rm -f wheelhouse/*-cp${VER}*.whl && ls -al wheelhouse
439473 - name : Publish package to PyPI
440474 uses : pypa/gh-action-pypi-publish@release/v1
441475 if : >
0 commit comments