Skip to content

Commit

Permalink
Add support for Python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Apr 22, 2022
1 parent 2b33bec commit 7ff3c05
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 9 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11.0-alpha.7"
os: [ubuntu-20.04, macos-latest]
exclude:
- os: macos-latest
Expand Down Expand Up @@ -152,7 +153,7 @@ jobs:
python setup.py bdist_wheel
# Also install it, so that we get dependencies in the (pip) cache.
pip install -U 'faulthandler; python_version == "2.7" and platform_python_implementation == "CPython"'
pip install .[test]
pip install --pre .[test]
- name: Check zope.security build
run: |
Expand All @@ -172,6 +173,7 @@ jobs:
&& startsWith(github.ref, 'refs/tags')
&& startsWith(runner.os, 'Mac')
&& !startsWith(matrix.python-version, 'pypy')
&& !startsWith(matrix.python-version, '3.11.0-alpha.7')
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
Expand All @@ -193,6 +195,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11.0-alpha.7"
os: [ubuntu-20.04, macos-latest]
exclude:
- os: macos-latest
Expand Down Expand Up @@ -236,13 +239,15 @@ jobs:
- name: Install zope.security
run: |
pip install -U wheel setuptools
pip install -U coverage
# coverage has 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
pip install -U 'faulthandler; python_version == "2.7" and platform_python_implementation == "CPython"'
# 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/zope.security-*whl -d src
pip install -U -e .[test]
pip install --pre -U -e .[test]
- name: Run tests with C extensions
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ lib64
log/
parts/
pyvenv.cfg
testing.log
var/
1 change: 1 addition & 0 deletions .manylinux-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ for PYBIN in /opt/python/*/bin; do
if \
[[ "${PYBIN}" == *"cp27"* ]] || \
[[ "${PYBIN}" == *"cp35"* ]] || \
[[ "${PYBIN}" == *"cp311"* ]] || \
[[ "${PYBIN}" == *"cp36"* ]] || \
[[ "${PYBIN}" == *"cp37"* ]] || \
[[ "${PYBIN}" == *"cp38"* ]] || \
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 = "15807bd13de45b79c7da560a377fe3f22cbc4338"
commit-id = "dbaca5f3c7785b7bca563dabc5f440544069a8f9"

[python]
with-appveyor = true
with-windows = false
with-pypy = true
with-future-python = false
with-future-python = true
with-legacy-python = true
with-docs = true
with-sphinx-doctests = true
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
See `issue 83
<https://github.com/zopefoundation/zope.security/issues/83>`_.

- Add support for Python 3.11 (as of 3.11.0a7).


5.2 (2022-03-10)
================
Expand Down
4 changes: 4 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ environment:
- python: 39-x64
- python: 310
- python: 310-x64
# `multibuild` cannot install non-final versions as they are not on
# ftp.python.org, so we skip Python 3.11 until its final release:
# - python: 311
# - python: 311-x64

install:
- "SET PYTHONVERSION=%PYTHON%"
Expand Down
18 changes: 14 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ envlist =
py38,py38-pure
py39,py39-pure
py310,py310-pure
py311,py311-pure
pypy
pypy3
docs
Expand All @@ -19,6 +20,7 @@ envlist =

[testenv]
usedevelop = true
pip_pre = true
deps =
setenv =
pure: PURE_PYTHON=1
Expand Down Expand Up @@ -49,15 +51,23 @@ commands =
[testenv:lint]
basepython = python3
skip_install = true
commands =
check-manifest
check-python-versions
deps =
flake8
check-manifest
check-python-versions >= 0.19.1
wheel
flake8
isort

[testenv:isort-apply]
basepython = python3
commands_pre =
deps =
isort
commands =
flake8 src setup.py
check-manifest
check-python-versions
isort {toxinidir}/src {toxinidir}/setup.py []

[testenv:docs]
basepython = python3
Expand Down

0 comments on commit 7ff3c05

Please sign in to comment.