diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3469405e6..9eb358d24 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,6 +27,7 @@ jobs: - ["3.9", "py39"] - ["3.10", "py310"] - ["3.11", "py311"] + - ["3.12.0-beta.4", "py312"] - ["pypy-3.9", "pypy3"] - ["3.9", "docs"] - ["3.9", "coverage"] diff --git a/.meta.toml b/.meta.toml index 158978c0a..c4c8fa730 100644 --- a/.meta.toml +++ b/.meta.toml @@ -2,12 +2,12 @@ # https://github.com/zopefoundation/meta/tree/master/config/pure-python [meta] template = "pure-python" -commit-id = "b99ba750" +commit-id = "49beb029" [python] with-windows = true with-pypy = true -with-future-python = false +with-future-python = true with-docs = true with-sphinx-doctests = false with-macos = false diff --git a/CHANGES.rst b/CHANGES.rst index c7e140f85..058da5777 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,8 @@ 6.0 (unreleased) ================ +- Add preliminary support for Python 3.12b4. + - Drop support for Python 2.7, 3.5, 3.6. diff --git a/src/ZODB/ConflictResolution.py b/src/ZODB/ConflictResolution.py index d7155fed2..3e5101796 100644 --- a/src/ZODB/ConflictResolution.py +++ b/src/ZODB/ConflictResolution.py @@ -123,7 +123,7 @@ class may have its own comparison, and we have no idea what it is. class PersistentReference: weak = False - oid = database_name = klass = None + oid = database_name = None def __init__(self, data): self.data = data diff --git a/src/ZODB/FileStorage/FileStorage.py b/src/ZODB/FileStorage/FileStorage.py index f9be9f4e4..a3afec596 100644 --- a/src/ZODB/FileStorage/FileStorage.py +++ b/src/ZODB/FileStorage/FileStorage.py @@ -535,8 +535,6 @@ def _lookup_pos(self, oid): except TypeError: raise TypeError("invalid oid {!r}".format(oid)) - load = load_current # Keep load for now for old clients - def load(self, oid, version=''): """Return pickle data and serial number.""" assert not version diff --git a/src/ZODB/tests/StorageTestBase.py b/src/ZODB/tests/StorageTestBase.py index 8de5dc884..5154ea999 100644 --- a/src/ZODB/tests/StorageTestBase.py +++ b/src/ZODB/tests/StorageTestBase.py @@ -150,7 +150,7 @@ def _dostore(self, oid=None, revid=None, data=None, revid = ZERO if data is None: data = MinPO(7) - if type(data) == int: + if isinstance(data, int): data = MinPO(data) if not already_pickled: data = zodb_pickle(data) diff --git a/tox.ini b/tox.ini index f62a7ba27..ddb56f5f1 100644 --- a/tox.ini +++ b/tox.ini @@ -9,6 +9,7 @@ envlist = py39 py310 py311 + py312 pypy3 docs coverage @@ -18,9 +19,12 @@ envlist = usedevelop = true package = wheel wheel_build_env = .pkg +pip_pre = py312: true deps = setenv = ZOPE_INTERFACE_STRICT_IRO=1 + py312: VIRTUALENV_PIP=23.1.2 + py312: PIP_REQUIRE_VIRTUALENV=0 commands = zope-testrunner --test-path=src -a 1000 {posargs:-vc} extras =