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 support for Python 3.11 (as of 3.11a6). #170

Merged
merged 1 commit into from Mar 10, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/tests.yml
Expand Up @@ -104,6 +104,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11.0-alpha.5"
os: [ubuntu-20.04, macos-latest]
exclude:
- os: macos-latest
Expand Down Expand Up @@ -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.5')
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
Expand All @@ -193,6 +195,7 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11.0-alpha.5"
os: [ubuntu-20.04, macos-latest]
exclude:
- os: macos-latest
Expand Down Expand Up @@ -236,7 +239,9 @@ jobs:
- name: Install persistent
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
Expand Down
9 changes: 5 additions & 4 deletions .manylinux-install.sh
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 All @@ -39,10 +40,10 @@ for PYBIN in /opt/python/*/bin; do
"${PYBIN}/pip" install -e /io/
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
if [ `uname -m` == 'aarch64' ]; then
cd /io/
"${PYBIN}/pip" install tox
"${PYBIN}/tox" -e py
cd ..
cd /io/
"${PYBIN}/pip" install tox
"${PYBIN}/tox" -e py
cd ..
fi
rm -rf /io/build /io/*.egg-info
fi
Expand Down
4 changes: 2 additions & 2 deletions .meta.toml
Expand Up @@ -2,13 +2,13 @@
# https://github.com/zopefoundation/meta/tree/master/config/c-code
[meta]
template = "c-code"
commit-id = "121e74bd9c9718abd9a1a079e6ede252c1a0ba7d"
commit-id = "0f5b30c3eb96c0e18b70965c730100a0de9ad50b"

[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
4 changes: 2 additions & 2 deletions CHANGES.rst
Expand Up @@ -2,10 +2,10 @@
``persistent`` Changelog
==========================

4.8.1 (unreleased)
4.9.0 (unreleased)
==================

- Nothing changed yet.
- Add support for Python 3.11 (as of 3.11a5).


4.8.0 (2022-03-07)
Expand Down
4 changes: 4 additions & 0 deletions appveyor.yml
Expand Up @@ -24,6 +24,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
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -19,7 +19,7 @@
from setuptools import find_packages
from setuptools import setup

version = '4.8.1.dev0'
version = '4.9.0.dev0'

here = os.path.abspath(os.path.dirname(__file__))

Expand Down
10 changes: 5 additions & 5 deletions src/persistent/cPersistence.c
Expand Up @@ -1091,7 +1091,7 @@ static int
Per_set_changed(cPersistentObject *self, PyObject *v)
{
int deactivate = 0;
int true;
int istrue;

if (!v)
{
Expand All @@ -1114,7 +1114,7 @@ Per_set_changed(cPersistentObject *self, PyObject *v)
Py_DECREF(res);
else
{
/* an error occured in _p_deactivate().
/* an error occurred in _p_deactivate().

It's not clear what we should do here. The code is
obviously ignoring the exception, but it shouldn't return
Expand All @@ -1136,10 +1136,10 @@ Per_set_changed(cPersistentObject *self, PyObject *v)
* If passed a false argument, and the object isn't a ghost, set the
* state as up-to-date.
*/
true = PyObject_IsTrue(v);
if (true == -1)
istrue = PyObject_IsTrue(v);
if (istrue == -1)
return -1;
if (true)
if (istrue)
{
if (self->state < 0)
{
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Expand Up @@ -11,6 +11,7 @@ envlist =
py38,py38-pure
py39,py39-pure
py310,py310-pure
py311,py311-pure
pypy
pypy3
docs
Expand Down