Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add preliminary support for Python 3.14a2. #81

Merged
merged 1 commit into from
Nov 28, 2024
Merged
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
38 changes: 36 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ jobs:
- "3.11"
- "3.12"
- "3.13"
- "3.14"
os: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- os: macos-latest
Expand Down Expand Up @@ -152,10 +153,16 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-

- name: Install Build Dependencies (3.14)
if: matrix.python-version == '3.14'
run: |
pip install -U pip
pip install -U "setuptools < 74" wheel twine
- name: Install Build Dependencies
if: matrix.python-version != '3.14'
run: |
pip install -U pip
pip install -U "setuptools <74" wheel twine
pip install -U "setuptools < 74" wheel twine

- name: Build ExtensionClass (macOS x86_64)
if: >
Expand Down Expand Up @@ -193,7 +200,15 @@ jobs:
python setup.py build_ext -i
python setup.py bdist_wheel

- name: Install ExtensionClass and dependencies (3.14)
if: matrix.python-version == '3.14'
run: |
# Install to collect dependencies into the (pip) cache.
# Use "--pre" here because dependencies with support for this future
# Python release may only be available as pre-releases
pip install --pre .[test]
- name: Install ExtensionClass and dependencies
if: matrix.python-version != '3.14'
run: |
# Install to collect dependencies into the (pip) cache.
pip install .[test]
Expand Down Expand Up @@ -236,6 +251,7 @@ jobs:
&& startsWith(github.ref, 'refs/tags')
&& !startsWith(runner.os, 'Linux')
&& !startsWith(matrix.python-version, 'pypy')
&& !startsWith(matrix.python-version, '3.14')
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
Expand All @@ -255,6 +271,7 @@ jobs:
- "3.11"
- "3.12"
- "3.13"
- "3.14"
os: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- os: macos-latest
Expand Down Expand Up @@ -309,9 +326,24 @@ jobs:
with:
name: ExtensionClass-${{ runner.os }}-${{ matrix.python-version }}.whl
path: dist/
- name: Install ExtensionClass ${{ matrix.python-version }}
if: matrix.python-version == '3.14'
run: |
pip install -U wheel "setuptools < 74"
# coverage might have a wheel on PyPI for a future python version which is
# not ABI compatible with the current one, so build it from sdist:
pip install -U --no-binary :all: coverage[toml]
# Unzip into src/ so that testrunner can find the .so files
# when we ask it to load tests from that directory. This
# might also save some build time?
unzip -n dist/ExtensionClass-*whl -d src
# Use "--pre" here because dependencies with support for this future
# Python release may only be available as pre-releases
pip install --pre -e .[test]
- name: Install ExtensionClass
if: matrix.python-version != '3.14'
run: |
pip install -U wheel "setuptools <74"
pip install -U wheel "setuptools < 74"
pip install -U coverage[toml]
pip install -U 'cffi; platform_python_implementation == "CPython"'
# Unzip into src/ so that testrunner can find the .so files
Expand Down Expand Up @@ -436,6 +468,8 @@ jobs:
name: manylinux_${{ matrix.image }}_wheels.zip
- name: Restore pip cache permissions
run: sudo chown -R $(whoami) ${{ steps.pip-cache-default.outputs.dir }}
- name: Prevent publishing wheels for unreleased Python versions
run: VER=$(echo '3.14' | tr -d .) && ls -al wheelhouse && sudo rm -f wheelhouse/*-cp${VER}*.whl && ls -al wheelhouse
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: >
Expand Down
13 changes: 10 additions & 3 deletions .manylinux-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ tox_env_map() {
*"cp311"*) echo 'py311';;
*"cp312"*) echo 'py312';;
*"cp313"*) echo 'py313';;
*"cp314"*) echo 'py314';;
*) echo 'py';;
esac
}
Expand All @@ -46,9 +47,15 @@ for PYBIN in /opt/python/*/bin; do
[[ "${PYBIN}" == *"cp310/"* ]] || \
[[ "${PYBIN}" == *"cp311/"* ]] || \
[[ "${PYBIN}" == *"cp312/"* ]] || \
[[ "${PYBIN}" == *"cp313/"* ]] ; then
"${PYBIN}/pip" install -e /io/
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
[[ "${PYBIN}" == *"cp313/"* ]] || \
[[ "${PYBIN}" == *"cp314/"* ]] ; then
if [[ "${PYBIN}" == *"cp314/"* ]] ; then
"${PYBIN}/pip" install --pre -e /io/
"${PYBIN}/pip" wheel /io/ --pre -w wheelhouse/
else
"${PYBIN}/pip" install -e /io/
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
fi
if [ `uname -m` == 'aarch64' ]; then
cd /io/
${PYBIN}/pip install tox
Expand Down
4 changes: 2 additions & 2 deletions .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# https://github.com/zopefoundation/meta/tree/master/config/c-code
[meta]
template = "c-code"
commit-id = "d8a8b5ed"
commit-id = "baf6089f"

[python]
with-windows = true
with-pypy = true
with-sphinx-doctests = false
with-future-python = false
with-future-python = true
with-macos = false
with-docs = false

Expand Down
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
6.1 (unreleased)
================

- Add preliminary support for Python 3.14a2.

6.0 (2024-09-17)
================
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# https://github.com/zopefoundation/meta/tree/master/config/c-code

[build-system]
requires = ["setuptools<74"]
requires = ["setuptools < 74"]
build-backend = "setuptools.build_meta"

[tool.coverage.run]
Expand Down
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ envlist =
py311,py311-pure
py312,py312-pure
py313,py313-pure
py314,py314-pure
pypy3
coverage

[testenv]
pip_pre = py314: true
deps =
setuptools <74
setuptools < 74
setenv =
pure: PURE_PYTHON=1
!pure-!pypy3: PURE_PYTHON=0
Expand Down Expand Up @@ -48,7 +50,7 @@ description = ensure that the distribution is ready to release
basepython = python3
skip_install = true
deps =
setuptools <74
setuptools < 74
twine
build
check-manifest
Expand Down
Loading