diff --git a/CHANGES.rst b/CHANGES.rst index 5b90bfb..c286809 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,7 @@ - Switch package to src-layout, this is a packaging only change. (`#168 `_) +- Add support for Python 3.10. 4.7.0 (2021-04-13) diff --git a/setup.py b/setup.py index d2e65e9..101b17b 100644 --- a/setup.py +++ b/setup.py @@ -101,6 +101,7 @@ def _read_file(filename): "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Framework :: ZODB", diff --git a/src/persistent/list.py b/src/persistent/list.py index f5a2d03..76ec93d 100644 --- a/src/persistent/list.py +++ b/src/persistent/list.py @@ -55,7 +55,7 @@ class PersistentList(UserList, persistent.Persistent): else lambda inst: inst.__delitem__(_SLICE_ALL) ) - if not PYTHON2 and sys.version_info[:3] < (3, 7, 4): + if not PYTHON2 and sys.version_info[:3] < (3, 7, 4): # pragma: no cover # Prior to 3.7.4, Python 3 (but not Python 2) failed to properly # return an instance of the same class. # See https://bugs.python.org/issue27639 @@ -68,7 +68,7 @@ def __getitem__(self, item): result = self.__class__(result) return result - if sys.version_info[:3] < (3, 7, 4): + if sys.version_info[:3] < (3, 7, 4): # pragma: no cover # Likewise for __copy__, except even Python 2 needs it. # See https://github.com/python/cpython/commit/3645d29a1dc2102fdb0f5f0c0129ff2295bcd768 def __copy__(self): diff --git a/src/persistent/tests/test_ring.py b/src/persistent/tests/test_ring.py index bc7461a..ebff69e 100644 --- a/src/persistent/tests/test_ring.py +++ b/src/persistent/tests/test_ring.py @@ -27,9 +27,8 @@ def _next_oid(cls): cls.__next_oid += 1 return cls.__next_oid - def __init__(self, oid=None): - if oid is None: - self._p_oid = self._next_oid() + def __init__(self): + self._p_oid = self._next_oid() def __repr__(self): # pragma: no cover return "" % (self._p_oid, id(self))