Skip to content

Commit 42f8cf5

Browse files
author
Michael Howitz
authored
Add preliminary support for Python 3.12a5. (#268)
1 parent 0dfb6cb commit 42f8cf5

File tree

7 files changed

+36
-10
lines changed

7 files changed

+36
-10
lines changed

.github/workflows/tests.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,17 @@ jobs:
9696
fail-fast: false
9797
matrix:
9898
python-version:
99-
- "pypy-3.7"
99+
- "pypy-3.9"
100100
- "3.7"
101101
- "3.8"
102102
- "3.9"
103103
- "3.10"
104104
- "3.11"
105+
- "3.12.0-alpha.5"
105106
os: [ubuntu-20.04, macos-11]
106107
exclude:
107108
- os: macos-11
108-
python-version: "pypy-3.7"
109+
python-version: "pypy-3.9"
109110

110111
steps:
111112
- name: checkout
@@ -177,7 +178,15 @@ jobs:
177178
python setup.py build_ext -i
178179
python setup.py bdist_wheel
179180
181+
- name: Install zope.interface and dependencies (3.12.0-alpha.5)
182+
if: matrix.python-version == '3.12.0-alpha.5'
183+
run: |
184+
# Install to collect dependencies into the (pip) cache.
185+
# Use "--pre" here because dependencies with support for this future
186+
# Python release may only be available as pre-releases
187+
pip install --pre .[test]
180188
- name: Install zope.interface and dependencies
189+
if: matrix.python-version != '3.12.0-alpha.5'
181190
run: |
182191
# Install to collect dependencies into the (pip) cache.
183192
pip install .[test]
@@ -221,6 +230,7 @@ jobs:
221230
&& startsWith(github.ref, 'refs/tags')
222231
&& startsWith(runner.os, 'Mac')
223232
&& !startsWith(matrix.python-version, 'pypy')
233+
&& !startsWith(matrix.python-version, '3.12.0-alpha.5')
224234
env:
225235
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
226236
run: |
@@ -233,16 +243,17 @@ jobs:
233243
fail-fast: false
234244
matrix:
235245
python-version:
236-
- "pypy-3.7"
246+
- "pypy-3.9"
237247
- "3.7"
238248
- "3.8"
239249
- "3.9"
240250
- "3.10"
241251
- "3.11"
252+
- "3.12.0-alpha.5"
242253
os: [ubuntu-20.04, macos-11]
243254
exclude:
244255
- os: macos-11
245-
python-version: "pypy-3.7"
256+
python-version: "pypy-3.9"
246257

247258
steps:
248259
- name: checkout

.manylinux-install.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ yum -y install libffi-devel
2828

2929
tox_env_map() {
3030
case $1 in
31+
*"cp312"*) echo 'py312';;
3132
*"cp37"*) echo 'py37';;
3233
*"cp38"*) echo 'py38';;
3334
*"cp39"*) echo 'py39';;
@@ -40,13 +41,19 @@ tox_env_map() {
4041
# Compile wheels
4142
for PYBIN in /opt/python/*/bin; do
4243
if \
44+
[[ "${PYBIN}" == *"cp312"* ]] || \
4345
[[ "${PYBIN}" == *"cp311"* ]] || \
4446
[[ "${PYBIN}" == *"cp37"* ]] || \
4547
[[ "${PYBIN}" == *"cp38"* ]] || \
4648
[[ "${PYBIN}" == *"cp39"* ]] || \
4749
[[ "${PYBIN}" == *"cp310"* ]] ; then
48-
"${PYBIN}/pip" install -e /io/
49-
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
50+
if [[ "${PYBIN}" == *"cp312"* ]] ; then
51+
"${PYBIN}/pip" install --pre -e /io/
52+
"${PYBIN}/pip" wheel /io/ --pre -w wheelhouse/
53+
else
54+
"${PYBIN}/pip" install -e /io/
55+
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
56+
fi
5057
if [ `uname -m` == 'aarch64' ]; then
5158
cd /io/
5259
${PYBIN}/pip install tox

.meta.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# https://github.com/zopefoundation/meta/tree/master/config/c-code
33
[meta]
44
template = "c-code"
5-
commit-id = "3c9d0741"
5+
commit-id = "c7a64084"
66

77
[python]
88
with-appveyor = true
99
with-pypy = true
1010
with-sphinx-doctests = true
1111
with-windows = false
12-
with-future-python = false
12+
with-future-python = true
1313
with-docs = true
1414
with-macos = false
1515

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
- Fix test deprecation warning on Python 3.11.
1313

14+
- Add preliminary support for Python 3.12 as of 3.12a5.
15+
1416
- Drop:
1517

1618
+ `zope.interface.implements`

appveyor.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ environment:
1515
- python: 39-x64
1616
- python: 310-x64
1717
- python: 311-x64
18+
# `multibuild` cannot install non-final versions as they are not on
19+
# ftp.python.org, so we skip Python 3.11 until its final release:
20+
# - python: 312-x64
1821

1922
install:
2023
- "SET PYTHONVERSION=%PYTHON%"

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ignore =
2323
force_single_line = True
2424
combine_as_imports = True
2525
sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER
26-
known_third_party = six, docutils, pkg_resources
26+
known_third_party = six, docutils, pkg_resources, pytz
2727
known_zope =
2828
known_first_party =
2929
default_section = ZOPE

tox.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
# Generated from:
22
# https://github.com/zopefoundation/meta/tree/master/config/c-code
33
[tox]
4-
minversion = 3.18
4+
minversion = 4.0
55
envlist =
66
lint
77
py37,py37-pure
88
py38,py38-pure
99
py39,py39-pure
1010
py310,py310-pure
1111
py311,py311-pure
12+
py312,py312-pure
1213
pypy3
1314
docs
1415
coverage
1516

1617
[testenv]
1718
usedevelop = true
19+
pip_pre = py312: true
1820
deps =
21+
Sphinx
1922
setenv =
2023
pure: PURE_PYTHON=1
2124
!pure-!pypy3: PURE_PYTHON=0

0 commit comments

Comments
 (0)