Skip to content

Commit

Permalink
Update Python 3.11 support to 3.11.0-beta3.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Jun 17, 2022
1 parent 006ab41 commit df1219d
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 11 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11.0-alpha.5"
- "3.11.0-beta.3"
os: [ubuntu-20.04, macos-latest]
exclude:
- os: macos-latest
Expand Down Expand Up @@ -145,7 +145,18 @@ jobs:
pip install -U pip
pip install -U setuptools wheel twine cffi
- name: Build persistent 3.11.0-beta.3
if: ${{ startsWith(matrix.python-version, '3.11.0-beta.3') }}
run: |
# Next, build the wheel *in place*. This helps ccache, and also lets us cache the configure
# output (pip install uses a random temporary directory, making this difficult).
python setup.py build_ext -i
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 --pre .[test]
- name: Build persistent
if: ${{ !startsWith(matrix.python-version, '3.11.0-beta.3') }}
run: |
# Next, build the wheel *in place*. This helps ccache, and also lets us cache the configure
# output (pip install uses a random temporary directory, making this difficult).
Expand Down Expand Up @@ -173,7 +184,7 @@ jobs:
&& startsWith(github.ref, 'refs/tags')
&& startsWith(runner.os, 'Mac')
&& !startsWith(matrix.python-version, 'pypy')
&& !startsWith(matrix.python-version, '3.11.0-alpha.5')
&& !startsWith(matrix.python-version, '3.11.0-beta.3')
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
Expand All @@ -195,7 +206,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11.0-alpha.5"
- "3.11.0-beta.3"
os: [ubuntu-20.04, macos-latest]
exclude:
- os: macos-latest
Expand Down Expand Up @@ -236,7 +247,8 @@ jobs:
with:
name: persistent-${{ runner.os }}-${{ matrix.python-version }}.whl
path: dist/
- name: Install persistent
- name: Install persistent 3.11.0-beta.3
if: ${{ startsWith(matrix.python-version, '3.11.0-beta.3') }}
run: |
pip install -U wheel setuptools
# coverage has a wheel on PyPI for a future python version which is
Expand All @@ -247,6 +259,17 @@ jobs:
# when we ask it to load tests from that directory. This
# might also save some build time?
unzip -n dist/persistent-*whl -d src
pip install --pre -U -e .[test]
- name: Install persistent
if: ${{ !startsWith(matrix.python-version, '3.11.0-beta.3') }}
run: |
pip install -U wheel setuptools
pip install -U 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/persistent-*whl -d src
pip install -U -e .[test]
- name: Run tests with C extensions
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
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/
9 changes: 7 additions & 2 deletions .manylinux-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ for PYBIN in /opt/python/*/bin; do
[[ "${PYBIN}" == *"cp38"* ]] || \
[[ "${PYBIN}" == *"cp39"* ]] || \
[[ "${PYBIN}" == *"cp310"* ]] ; then
"${PYBIN}/pip" install -e /io/
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
if [[ "${PYBIN}" == *"cp311"* ]] ; 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
2 changes: 1 addition & 1 deletion .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/zopefoundation/meta/tree/master/config/c-code
[meta]
template = "c-code"
commit-id = "0f5b30c3eb96c0e18b70965c730100a0de9ad50b"
commit-id = "b3d8eac5a78ee70e23db64ebe690563bd6f42ae4"

[python]
with-appveyor = true
Expand Down
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
4.9.1 (unreleased)
==================

- Nothing changed yet.
- Update Python 3.11 support to 3.11.0-beta3.


4.9.0 (2022-03-10)
Expand Down
11 changes: 11 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,14 @@ ignore =
docs/_build/html/_sources/*
docs/_build/doctest/*
docs/_build/html/_sources/api/*

[isort]
force_single_line = True
combine_as_imports = True
sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER
known_third_party = six, docutils, pkg_resources
known_zope =
known_first_party =
default_section = ZOPE
line_length = 79
lines_after_imports = 2
9 changes: 6 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ envlist =

[testenv]
usedevelop = true
pip_pre = true
deps =
# repoze.sphinx.autointerface does not yet support Sphinx >= 5:
Sphinx < 5
setenv =
pure: PURE_PYTHON=1
!pure-!pypy-!pypy3: PURE_PYTHON=0
Expand Down Expand Up @@ -49,13 +52,13 @@ commands =
[testenv:lint]
basepython = python3
skip_install = true
commands =
check-manifest
check-python-versions
deps =
check-manifest
check-python-versions >= 0.19.1
wheel
commands =
check-manifest
check-python-versions

[testenv:docs]
basepython = python3
Expand Down

0 comments on commit df1219d

Please sign in to comment.