Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-zodbpickle for openSUSE:Factory checked in at 2022-10-14 15:41:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-zodbpickle (Old) and /work/SRC/openSUSE:Factory/.python-zodbpickle.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-zodbpickle" Fri Oct 14 15:41:18 2022 rev:10 rq:1010365 version:2.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-zodbpickle/python-zodbpickle.changes 2022-09-19 16:03:39.474201837 +0200 +++ /work/SRC/openSUSE:Factory/.python-zodbpickle.new.2275/python-zodbpickle.changes 2022-10-14 15:41:59.875864160 +0200 @@ -1,0 +2,7 @@ +Wed Oct 12 18:28:01 UTC 2022 - Yogalakshmi Arunachalam <yarunacha...@suse.com> + +- Update to version 2.4.0 + * Add support for Python 3.11 (as of 3.11.0b3). + * Disable unsafe math optimizations in C code. See pull request 73. + +------------------------------------------------------------------- Old: ---- zodbpickle-2.3.tar.gz New: ---- zodbpickle-2.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-zodbpickle.spec ++++++ --- /var/tmp/diff_new_pack.zZLWBk/_old 2022-10-14 15:42:00.371864988 +0200 +++ /var/tmp/diff_new_pack.zZLWBk/_new 2022-10-14 15:42:00.375864995 +0200 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-zodbpickle -Version: 2.3 +Version: 2.4 Release: 0 Summary: Fork of Python 3 pickle module License: Python-2.0 AND ZPL-2.1 ++++++ zodbpickle-2.3.tar.gz -> zodbpickle-2.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/.manylinux-install.sh new/zodbpickle-2.4/.manylinux-install.sh --- old/zodbpickle-2.3/.manylinux-install.sh 2022-04-22 08:18:59.000000000 +0200 +++ new/zodbpickle-2.4/.manylinux-install.sh 2022-09-15 08:24:37.000000000 +0200 @@ -26,6 +26,20 @@ # We need some libraries because we build wheels from scratch: yum -y install libffi-devel +tox_env_map() { + case $1 in + *"cp27"*) echo 'py27';; + *"cp35"*) echo 'py35';; + *"cp311"*) echo 'py311';; + *"cp36"*) echo 'py36';; + *"cp37"*) echo 'py37';; + *"cp38"*) echo 'py38';; + *"cp39"*) echo 'py39';; + *"cp310"*) echo 'py310';; + *) echo 'py';; + esac +} + # Compile wheels for PYBIN in /opt/python/*/bin; do if \ @@ -37,12 +51,18 @@ [[ "${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 - "${PYBIN}/tox" -e py + ${PYBIN}/pip install tox + TOXENV=$(tox_env_map "${PYBIN}") + ${PYBIN}/tox -e ${TOXENV} cd .. fi rm -rf /io/build /io/*.egg-info diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/CHANGES.rst new/zodbpickle-2.4/CHANGES.rst --- old/zodbpickle-2.3/CHANGES.rst 2022-04-22 08:18:59.000000000 +0200 +++ new/zodbpickle-2.4/CHANGES.rst 2022-09-15 08:24:37.000000000 +0200 @@ -2,6 +2,15 @@ Changelog =========== +2.4 (2022-09-15) +================ + +- Add support for Python 3.11 (as of 3.11.0b3). + +- Disable unsafe math optimizations in C code. See `pull request 73 + <https://github.com/zopefoundation/zodbpickle/pull/73>`_. + + 2.3 (2022-04-22) ================ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/PKG-INFO new/zodbpickle-2.4/PKG-INFO --- old/zodbpickle-2.3/PKG-INFO 2022-04-22 08:19:01.856468700 +0200 +++ new/zodbpickle-2.4/PKG-INFO 2022-09-15 08:24:39.126090500 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: zodbpickle -Version: 2.3 +Version: 2.4 Summary: Fork of Python 2 and 3 pickle module. Home-page: https://github.com/zopefoundation/zodbpickle Author: Python and Zope Foundation @@ -36,8 +36,8 @@ ``zodbpickle`` README ===================== -.. image:: https://travis-ci.com/zopefoundation/zodbpickle.svg?branch=master - :target: https://travis-ci.com/zopefoundation/zodbpickle +.. image:: https://github.com/zopefoundation/zodbpickle/actions/workflows/tests.yml/badge.svg + :target: https://github.com/zopefoundation/zodbpickle/actions/workflows/tests.yml .. image:: https://coveralls.io/repos/github/zopefoundation/zodbpickle/badge.svg :target: https://coveralls.io/github/zopefoundation/zodbpickle @@ -204,6 +204,15 @@ Changelog =========== +2.4 (2022-09-15) +================ + +- Add support for Python 3.11 (as of 3.11.0b3). + +- Disable unsafe math optimizations in C code. See `pull request 73 + <https://github.com/zopefoundation/zodbpickle/pull/73>`_. + + 2.3 (2022-04-22) ================ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/README.rst new/zodbpickle-2.4/README.rst --- old/zodbpickle-2.3/README.rst 2022-04-22 08:18:59.000000000 +0200 +++ new/zodbpickle-2.4/README.rst 2022-09-15 08:24:37.000000000 +0200 @@ -1,8 +1,8 @@ ``zodbpickle`` README ===================== -.. image:: https://travis-ci.com/zopefoundation/zodbpickle.svg?branch=master - :target: https://travis-ci.com/zopefoundation/zodbpickle +.. image:: https://github.com/zopefoundation/zodbpickle/actions/workflows/tests.yml/badge.svg + :target: https://github.com/zopefoundation/zodbpickle/actions/workflows/tests.yml .. image:: https://coveralls.io/repos/github/zopefoundation/zodbpickle/badge.svg :target: https://coveralls.io/github/zopefoundation/zodbpickle diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/appveyor.yml new/zodbpickle-2.4/appveyor.yml --- old/zodbpickle-2.3/appveyor.yml 2022-04-22 08:18:59.000000000 +0200 +++ new/zodbpickle-2.4/appveyor.yml 2022-09-15 08:24:37.000000000 +0200 @@ -50,7 +50,7 @@ - python -W ignore setup.py -q bdist_wheel test_script: - - zope-testrunner --test-path=src -m zodbpickle.tests.test_pickle$ + - zope-testrunner --test-path=src artifacts: - path: 'dist\*.whl' name: wheel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/buildout.cfg new/zodbpickle-2.4/buildout.cfg --- old/zodbpickle-2.3/buildout.cfg 2022-04-22 08:18:59.000000000 +0200 +++ new/zodbpickle-2.4/buildout.cfg 2022-09-15 08:24:37.000000000 +0200 @@ -8,12 +8,6 @@ recipe = zc.recipe.testrunner eggs = zodbpickle [test] -# there's test_pickle_2 for Python 2 and test_pickle_3 for Python 3 -# different test files because metaclass syntax differs on Pythons -# test_pickle picks and returns the appropriate one -# without this we'd get an import error (actually syntax error) for one -# of them -defaults = ['-m', 'zodbpickle.tests.test_pickle$'] [scripts] recipe = zc.recipe.egg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/setup.py new/zodbpickle-2.4/setup.py --- old/zodbpickle-2.3/setup.py 2022-04-22 08:18:59.000000000 +0200 +++ new/zodbpickle-2.4/setup.py 2022-09-15 08:24:37.000000000 +0200 @@ -47,7 +47,7 @@ setup( name='zodbpickle', - version='2.3', + version='2.4', description='Fork of Python 2 and 3 pickle module.', author='Python and Zope Foundation', author_email='zodb-...@zope.org', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/src/zodbpickle/tests/pickle_2_tests.py new/zodbpickle-2.4/src/zodbpickle/tests/pickle_2_tests.py --- old/zodbpickle-2.3/src/zodbpickle/tests/pickle_2_tests.py 1970-01-01 01:00:00.000000000 +0100 +++ new/zodbpickle-2.4/src/zodbpickle/tests/pickle_2_tests.py 2022-09-15 08:24:37.000000000 +0200 @@ -0,0 +1,412 @@ +import cStringIO +import io +import unittest +from cStringIO import StringIO + +from .pickletester_2 import (AbstractPickleTests, + AbstractPickleModuleTests, + AbstractPersistentPicklerTests, + AbstractPicklerUnpicklerObjectTests, + BigmemPickleTests, + has_c_implementation) + +from test import test_support + +class cStringIOMixin: + output = input = cStringIO.StringIO + + def close(self, f): + pass + +class BytesIOMixin: + output = input = io.BytesIO + + def close(self, f): + pass + +class FileIOMixin: + + def output(self): + return open(test_support.TESTFN, 'wb+') + + def input(self, data): + f = open(test_support.TESTFN, 'wb+') + try: + f.write(data) + f.seek(0) + return f + except: + f.close() + raise + + def close(self, f): + f.close() + test_support.unlink(test_support.TESTFN) + + +class PickleTests(AbstractPickleTests, AbstractPickleModuleTests): + + def dumps(self, arg, proto=0, fast=0): + from zodbpickle.pickle_2 import dumps + # Ignore fast + return dumps(arg, proto) + + def loads(self, buf): + from zodbpickle.pickle_2 import loads + # Ignore fast + return loads(buf) + + @property + def module(self): + from zodbpickle import pickle_2 + return pickle_2 + + error = KeyError + + +class PicklerTests(AbstractPickleTests): + + error = KeyError + + def dumps(self, arg, proto=0, fast=0): + from zodbpickle.pickle_2 import Pickler + f = cStringIO.StringIO() + p = Pickler(f, proto) + if fast: + p.fast = fast + p.dump(arg) + f.seek(0) + return f.read() + + def loads(self, buf): + from zodbpickle.pickle_2 import Unpickler + f = cStringIO.StringIO(buf) + u = Unpickler(f) + return u.load() + + +class PersPicklerTests(AbstractPersistentPicklerTests): + + def dumps(self, arg, proto=0, fast=0): + from zodbpickle.pickle_2 import Pickler + class PersPickler(Pickler): + def persistent_id(subself, obj): + return self.persistent_id(obj) + f = cStringIO.StringIO() + p = PersPickler(f, proto) + if fast: + p.fast = fast + p.dump(arg) + f.seek(0) + return f.read() + + def loads(self, buf): + from zodbpickle.pickle_2 import Unpickler + class PersUnpickler(Unpickler): + def persistent_load(subself, obj): + return self.persistent_load(obj) + f = cStringIO.StringIO(buf) + u = PersUnpickler(f) + return u.load() + + +class PicklerUnpicklerObjectTests(AbstractPicklerUnpicklerObjectTests): + + @property + def pickler_class(self): + from zodbpickle.pickle_2 import Pickler + return Pickler + + @property + def unpickler_class(self): + from zodbpickle.pickle_2 import Unpickler + return Unpickler + + +class PickleBigmemPickleTests(BigmemPickleTests): + + def dumps(self, arg, proto=0, fast=0): + from zodbpickle import pickle_2 + # Ignore fast + return pickle_2.dumps(arg, proto) + + def loads(self, buf): + from zodbpickle import pickle_2 + # Ignore fast + return pickle_2.loads(buf) + + +class cPickleBase(object): + + @property + def error(self): + from zodbpickle._pickle import BadPickleGet + return BadPickleGet + + +class cPickleTests(AbstractPickleTests, + AbstractPickleModuleTests, + cPickleBase, + ): + def setUp(self): + from zodbpickle._pickle import dumps + from zodbpickle._pickle import loads + self.dumps = dumps + self.loads = loads + + @property + def module(self): + from zodbpickle import _pickle + return _pickle + + +class cPicklePicklerTests(AbstractPickleTests, cPickleBase): + + def dumps(self, arg, proto=0): + from zodbpickle import _pickle + f = self.output() + try: + p = _pickle.Pickler(f, proto) + p.dump(arg) + f.seek(0) + return f.read() + finally: + self.close(f) + + def loads(self, buf): + from zodbpickle import _pickle + f = self.input(buf) + try: + p = _pickle.Unpickler(f) + return p.load() + finally: + self.close(f) + +class cStringIOCPicklerTests(cStringIOMixin, cPicklePicklerTests): + pass + +class BytesIOCPicklerTests(BytesIOMixin, cPicklePicklerTests): + pass + +class FileIOCPicklerTests(FileIOMixin, cPicklePicklerTests): + pass + + +class cPickleListPicklerTests(AbstractPickleTests, cPickleBase): + + def dumps(self, arg, proto=0): + from zodbpickle import _pickle + p = _pickle.Pickler(proto) + p.dump(arg) + return p.getvalue() + + def loads(self, *args): + from zodbpickle import _pickle + f = self.input(args[0]) + try: + p = _pickle.Unpickler(f) + return p.load() + finally: + self.close(f) + +class cStringIOCPicklerListTests(cStringIOMixin, cPickleListPicklerTests): + pass + +class BytesIOCPicklerListTests(BytesIOMixin, cPickleListPicklerTests): + pass + +class FileIOCPicklerListTests(FileIOMixin, cPickleListPicklerTests): + pass + + +class cPickleFastPicklerTests(AbstractPickleTests, cPickleBase): + + def dumps(self, arg, proto=0): + from zodbpickle import _pickle + f = self.output() + try: + p = _pickle.Pickler(f, proto) + p.fast = 1 + p.dump(arg) + f.seek(0) + return f.read() + finally: + self.close(f) + + def loads(self, *args): + from zodbpickle import _pickle + f = self.input(args[0]) + try: + p = _pickle.Unpickler(f) + return p.load() + finally: + self.close(f) + + def test_recursive_list(self): + self.assertRaises(ValueError, + AbstractPickleTests.test_recursive_list, + self) + + def test_recursive_tuple(self): + self.assertRaises(ValueError, + AbstractPickleTests.test_recursive_tuple, + self) + + def test_recursive_inst(self): + self.assertRaises(ValueError, + AbstractPickleTests.test_recursive_inst, + self) + + def test_recursive_dict(self): + self.assertRaises(ValueError, + AbstractPickleTests.test_recursive_dict, + self) + + def test_recursive_multi(self): + self.assertRaises(ValueError, + AbstractPickleTests.test_recursive_multi, + self) + + def test_nonrecursive_deep(self): + # If it's not cyclic, it should pickle OK even if the nesting + # depth exceeds PY_CPICKLE_FAST_LIMIT. That happens to be + # 50 today. Jack Jansen reported stack overflow on Mac OS 9 + # at 64. + a = [] + for i in range(60): + a = [a] + b = self.loads(self.dumps(a)) + self.assertEqual(a, b) + +class cStringIOCPicklerFastTests(cStringIOMixin, cPickleFastPicklerTests): + pass + +class BytesIOCPicklerFastTests(BytesIOMixin, cPickleFastPicklerTests): + pass + +class FileIOCPicklerFastTests(FileIOMixin, cPickleFastPicklerTests): + pass + + +class cPicklePicklerUnpicklerObjectTests(AbstractPicklerUnpicklerObjectTests): + + @property + def pickler_class(self): + from zodbpickle._pickle import Pickler + return Pickler + + @property + def unpickler_class(self): + from zodbpickle._pickle import Unpickler + return Unpickler + +class cPickleBigmemPickleTests(BigmemPickleTests): + + def dumps(self, arg, proto=0, fast=0): + from zodbpickle import _pickle + # Ignore fast + return _pickle.dumps(arg, proto) + + def loads(self, buf): + from zodbpickle import _pickle + # Ignore fast + return _pickle.loads(buf) + + +class Node(object): + pass + +class cPickleDeepRecursive(unittest.TestCase): + + def test_issue2702(self): + # This should raise a RecursionLimit but in some + # platforms (FreeBSD, win32) sometimes raises KeyError instead, + # or just silently terminates the interpreter (=crashes). + from zodbpickle import _pickle + nodes = [Node() for i in range(500)] + for n in nodes: + n.connections = list(nodes) + n.connections.remove(n) + self.assertRaises((AttributeError, RuntimeError), _pickle.dumps, n) + + def test_issue3179(self): + # Safe test, because I broke this case when fixing the + # behaviour for the previous test. + from zodbpickle import _pickle + res=[] + for x in range(1,2000): + res.append(dict(doc=x, similar=[])) + _pickle.dumps(res) + + +class BinaryTests(unittest.TestCase): + + def test_has_no_attrs(self): + from zodbpickle import binary + b = binary('abc') + with self.assertRaises(AttributeError): + setattr(b, 'attr', 42) + + def test_can_subclass(self): + from zodbpickle import binary + class MyBinary(binary): + pass + + my = MyBinary('') + my.attr = 42 + self.assertEqual(my, '') + self.assertEqual(my.attr, 42) + +class cBinaryTests(unittest.TestCase): + + def test_same_size(self): + # PyPy doesn't support sys.getsizeof, but + # we don't run these tests there. + import sys + from zodbpickle import binary + + s = b'abcdef' + b = binary(s) + self.assertEqual(sys.getsizeof(b), sys.getsizeof(s)) + + def test_not_tracked_by_gc(self): + # PyPy doesn't have gc.is_tracked, but we don't + # run these tests there. + import gc + from zodbpickle import binary + s = b'abcdef' + b = binary(s) + self.assertFalse(gc.is_tracked(s)) + self.assertFalse(gc.is_tracked(b)) + +def test_suite(): + tests = [ + unittest.makeSuite(PickleTests), + unittest.makeSuite(PicklerTests), + unittest.makeSuite(PersPicklerTests), + unittest.makeSuite(PicklerUnpicklerObjectTests), + unittest.makeSuite(PickleBigmemPickleTests), + unittest.makeSuite(BinaryTests), + ] + + if has_c_implementation: + tests.extend([ + unittest.makeSuite(cPickleTests), + unittest.makeSuite(cStringIOCPicklerTests), + unittest.makeSuite(BytesIOCPicklerTests), + unittest.makeSuite(FileIOCPicklerTests), + unittest.makeSuite(cStringIOCPicklerListTests), + unittest.makeSuite(BytesIOCPicklerListTests), + unittest.makeSuite(FileIOCPicklerListTests), + unittest.makeSuite(cStringIOCPicklerFastTests), + unittest.makeSuite(BytesIOCPicklerFastTests), + unittest.makeSuite(FileIOCPicklerFastTests), + unittest.makeSuite(cPickleDeepRecursive), + unittest.makeSuite(cPicklePicklerUnpicklerObjectTests), + unittest.makeSuite(cPickleBigmemPickleTests), + unittest.makeSuite(cBinaryTests), + ]) + return unittest.TestSuite(tests) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/src/zodbpickle/tests/pickle_3_tests.py new/zodbpickle-2.4/src/zodbpickle/tests/pickle_3_tests.py --- old/zodbpickle-2.3/src/zodbpickle/tests/pickle_3_tests.py 1970-01-01 01:00:00.000000000 +0100 +++ new/zodbpickle-2.4/src/zodbpickle/tests/pickle_3_tests.py 2022-09-15 08:24:37.000000000 +0200 @@ -0,0 +1,192 @@ +import io +import collections +import unittest +import doctest +from test import support as test_support + +from .pickletester_3 import AbstractPickleTests +from .pickletester_3 import AbstractPickleModuleTests +from .pickletester_3 import AbstractPersistentPicklerTests +from .pickletester_3 import AbstractPicklerUnpicklerObjectTests +from .pickletester_3 import AbstractDispatchTableTests +from .pickletester_3 import BigmemPickleTests +from .pickletester_3 import AbstractBytestrTests +from .pickletester_3 import AbstractBytesFallbackTests + +from . import _is_pypy +from . import _is_pure +from zodbpickle import pickle_3 as pickle +from zodbpickle import pickletools_3 as pickletools + +try: + from zodbpickle import _pickle + has_c_implementation = not _is_pypy and not _is_pure +except ImportError: + has_c_implementation = False + + +class PickleTests(AbstractPickleModuleTests): + pass + + +class PyPicklerBase(object): + + pickler = pickle._Pickler + unpickler = pickle._Unpickler + + def dumps(self, arg, proto=None, **kwds): + f = io.BytesIO() + p = self.pickler(f, proto, **kwds) + p.dump(arg) + f.seek(0) + return bytes(f.read()) + + def loads(self, buf, **kwds): + f = io.BytesIO(buf) + u = self.unpickler(f, **kwds) + return u.load() + +class PyPicklerTests(PyPicklerBase, AbstractPickleTests): + pass + +class PyPicklerBytestrTests(PyPicklerBase, AbstractBytestrTests): + pass + +class PyPicklerBytesFallbackTests(PyPicklerBase, AbstractBytesFallbackTests): + pass + +class InMemoryPickleTests(AbstractPickleTests, BigmemPickleTests): + + pickler = pickle._Pickler + unpickler = pickle._Unpickler + + def dumps(self, arg, protocol=None): + return pickle.dumps(arg, protocol) + + def loads(self, buf, **kwds): + return pickle.loads(buf, **kwds) + + +class PyPersPicklerTests(AbstractPersistentPicklerTests): + + pickler = pickle._Pickler + unpickler = pickle._Unpickler + + def dumps(self, arg, proto=None): + class PersPickler(self.pickler): + def persistent_id(subself, obj): + return self.persistent_id(obj) + f = io.BytesIO() + p = PersPickler(f, proto) + p.dump(arg) + f.seek(0) + return f.read() + + def loads(self, buf, **kwds): + class PersUnpickler(self.unpickler): + def persistent_load(subself, obj): + return self.persistent_load(obj) + f = io.BytesIO(buf) + u = PersUnpickler(f, **kwds) + return u.load() + + +class PyPicklerUnpicklerObjectTests(AbstractPicklerUnpicklerObjectTests): + + pickler_class = pickle._Pickler + unpickler_class = pickle._Unpickler + + +class PyDispatchTableTests(AbstractDispatchTableTests): + pickler_class = pickle._Pickler + + def get_dispatch_table(self): + return pickle.dispatch_table.copy() + + +class PyChainDispatchTableTests(AbstractDispatchTableTests): + pickler_class = pickle._Pickler + + def get_dispatch_table(self): + return collections.ChainMap({}, pickle.dispatch_table) + + +if has_c_implementation: + class CPicklerTests(PyPicklerTests): + pickler = _pickle.Pickler + unpickler = _pickle.Unpickler + + class CPicklerBytestrTests(PyPicklerBytestrTests): + pickler = _pickle.Pickler + unpickler = _pickle.Unpickler + + class CPicklerBytesFallbackTests(PyPicklerBytesFallbackTests): + pickler = _pickle.Pickler + unpickler = _pickle.Unpickler + + class CPersPicklerTests(PyPersPicklerTests): + pickler = _pickle.Pickler + unpickler = _pickle.Unpickler + + class CDumpPickle_LoadPickle(PyPicklerTests): + pickler = _pickle.Pickler + unpickler = pickle._Unpickler + + class DumpPickle_CLoadPickle(PyPicklerTests): + pickler = pickle._Pickler + unpickler = _pickle.Unpickler + + class CPicklerUnpicklerObjectTests(AbstractPicklerUnpicklerObjectTests): + pickler_class = _pickle.Pickler + unpickler_class = _pickle.Unpickler + + class CDispatchTableTests(AbstractDispatchTableTests): + pickler_class = pickle.Pickler + + def get_dispatch_table(self): + return pickle.dispatch_table.copy() + + class CChainDispatchTableTests(AbstractDispatchTableTests): + pickler_class = pickle.Pickler + + def get_dispatch_table(self): + return collections.ChainMap({}, pickle.dispatch_table) + + +def choose_tests(): + tests = [ + PickleTests, + PyPicklerTests, + PyPersPicklerTests, + PyPicklerBytestrTests, + PyPicklerBytesFallbackTests, + PyDispatchTableTests, + PyChainDispatchTableTests, + ] + if has_c_implementation: + tests.extend([ + CPicklerTests, + CPersPicklerTests, + CPicklerBytestrTests, + CPicklerBytesFallbackTests, + CDumpPickle_LoadPickle, + DumpPickle_CLoadPickle, + PyPicklerUnpicklerObjectTests, + CPicklerUnpicklerObjectTests, + InMemoryPickleTests, + CDispatchTableTests, + CChainDispatchTableTests, + ]) + return tests + + +def test_suite(): + return unittest.TestSuite([ + unittest.makeSuite(t) for t in choose_tests() + ] + [ + doctest.DocTestSuite(pickle), + doctest.DocTestSuite(pickletools), + ]) + +if __name__ == '__main__': + test_support.run_unittest(test_suite()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/src/zodbpickle/tests/pickletester_3.py new/zodbpickle-2.4/src/zodbpickle/tests/pickletester_3.py --- old/zodbpickle-2.3/src/zodbpickle/tests/pickletester_3.py 2022-04-22 08:18:59.000000000 +0200 +++ new/zodbpickle-2.4/src/zodbpickle/tests/pickletester_3.py 2022-09-15 08:24:37.000000000 +0200 @@ -32,6 +32,7 @@ return wrapper _PY343 = sys.version_info[:3] >= (3, 4, 3) +_PY311b1 = sys.hexversion >= 0x30b00b1 # 3.11.0b1 from zodbpickle.pickle_3 import bytes_types from . import _is_pypy @@ -1107,8 +1108,21 @@ @no_tracing def test_bad_getattr(self): x = BadGetattr() - for proto in (0, 1, 2): - self.assertRaises(RuntimeError, self.dumps, x, proto) + + if _PY311b1: + # https://github.com/python/cpython/pull/2821 fixed runtime error + # problem for protocol version 2 and above it landed in 3.11.0b1. + proto_versions_with_runtime_error = (0, 1) + proto_versions_without_runtime_error = (2,) + else: + proto_versions_with_runtime_error = (0, 1, 2) + proto_versions_without_runtime_error = () + + for proto in proto_versions_with_runtime_error: + with self.assertRaises(RuntimeError, msg='proto=%s' % proto): + self.dumps(x, proto) + for proto in proto_versions_without_runtime_error: + self.dumps(x, proto) def test_reduce_bad_iterator(self): # Issue4176: crash when 4th and 5th items of __reduce__() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/src/zodbpickle/tests/test_compile_flags.py new/zodbpickle-2.4/src/zodbpickle/tests/test_compile_flags.py --- old/zodbpickle-2.3/src/zodbpickle/tests/test_compile_flags.py 1970-01-01 01:00:00.000000000 +0100 +++ new/zodbpickle-2.4/src/zodbpickle/tests/test_compile_flags.py 2022-09-15 08:24:37.000000000 +0200 @@ -0,0 +1,32 @@ +############################################################################## +# +# Copyright (c) 2022 Zope Foundation and Contributors. +# All Rights Reserved. +# +# This software is subject to the provisions of the Zope Public License, +# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS +# FOR A PARTICULAR PURPOSE +# +############################################################################## +import struct +import unittest + +try: + import zodbpickle._pickle # noqa: try to load a C module for side effects +except ImportError: # pragma: no cover + pass + + +class TestFloatingPoint(unittest.TestCase): + + def test_no_fast_math_optimization(self): + # Building with -Ofast enables -ffast-math, which sets certain FPU + # flags that can cause breakage elsewhere. A library such as BTrees + # has no business changing global FPU flags for the entire process. + zero_bits = struct.unpack("!Q", struct.pack("!d", 0.0))[0] + next_up = zero_bits + 1 + smallest_subnormal = struct.unpack("!d", struct.pack("!Q", next_up))[0] + self.assertNotEqual(smallest_subnormal, 0.0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/src/zodbpickle/tests/test_pickle.py new/zodbpickle-2.4/src/zodbpickle/tests/test_pickle.py --- old/zodbpickle-2.3/src/zodbpickle/tests/test_pickle.py 2022-04-22 08:18:59.000000000 +0200 +++ new/zodbpickle-2.4/src/zodbpickle/tests/test_pickle.py 2022-09-15 08:24:37.000000000 +0200 @@ -43,10 +43,10 @@ def test_suite(): import sys if sys.version_info[0] >= 3: - from .test_pickle_3 import test_suite + from .pickle_3_tests import test_suite else: - from .test_pickle_2 import test_suite - return unittest.TestSuite(( + from .pickle_2_tests import test_suite + return unittest.TestSuite([ test_suite(), - unittest.makeSuite(TestImportability), - )) + unittest.defaultTestLoader.loadTestsFromName(__name__), + ]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/src/zodbpickle/tests/test_pickle_2.py new/zodbpickle-2.4/src/zodbpickle/tests/test_pickle_2.py --- old/zodbpickle-2.3/src/zodbpickle/tests/test_pickle_2.py 2022-04-22 08:18:59.000000000 +0200 +++ new/zodbpickle-2.4/src/zodbpickle/tests/test_pickle_2.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,412 +0,0 @@ -import cStringIO -import io -import unittest -from cStringIO import StringIO - -from .pickletester_2 import (AbstractPickleTests, - AbstractPickleModuleTests, - AbstractPersistentPicklerTests, - AbstractPicklerUnpicklerObjectTests, - BigmemPickleTests, - has_c_implementation) - -from test import test_support - -class cStringIOMixin: - output = input = cStringIO.StringIO - - def close(self, f): - pass - -class BytesIOMixin: - output = input = io.BytesIO - - def close(self, f): - pass - -class FileIOMixin: - - def output(self): - return open(test_support.TESTFN, 'wb+') - - def input(self, data): - f = open(test_support.TESTFN, 'wb+') - try: - f.write(data) - f.seek(0) - return f - except: - f.close() - raise - - def close(self, f): - f.close() - test_support.unlink(test_support.TESTFN) - - -class PickleTests(AbstractPickleTests, AbstractPickleModuleTests): - - def dumps(self, arg, proto=0, fast=0): - from zodbpickle.pickle_2 import dumps - # Ignore fast - return dumps(arg, proto) - - def loads(self, buf): - from zodbpickle.pickle_2 import loads - # Ignore fast - return loads(buf) - - @property - def module(self): - from zodbpickle import pickle_2 - return pickle_2 - - error = KeyError - - -class PicklerTests(AbstractPickleTests): - - error = KeyError - - def dumps(self, arg, proto=0, fast=0): - from zodbpickle.pickle_2 import Pickler - f = cStringIO.StringIO() - p = Pickler(f, proto) - if fast: - p.fast = fast - p.dump(arg) - f.seek(0) - return f.read() - - def loads(self, buf): - from zodbpickle.pickle_2 import Unpickler - f = cStringIO.StringIO(buf) - u = Unpickler(f) - return u.load() - - -class PersPicklerTests(AbstractPersistentPicklerTests): - - def dumps(self, arg, proto=0, fast=0): - from zodbpickle.pickle_2 import Pickler - class PersPickler(Pickler): - def persistent_id(subself, obj): - return self.persistent_id(obj) - f = cStringIO.StringIO() - p = PersPickler(f, proto) - if fast: - p.fast = fast - p.dump(arg) - f.seek(0) - return f.read() - - def loads(self, buf): - from zodbpickle.pickle_2 import Unpickler - class PersUnpickler(Unpickler): - def persistent_load(subself, obj): - return self.persistent_load(obj) - f = cStringIO.StringIO(buf) - u = PersUnpickler(f) - return u.load() - - -class PicklerUnpicklerObjectTests(AbstractPicklerUnpicklerObjectTests): - - @property - def pickler_class(self): - from zodbpickle.pickle_2 import Pickler - return Pickler - - @property - def unpickler_class(self): - from zodbpickle.pickle_2 import Unpickler - return Unpickler - - -class PickleBigmemPickleTests(BigmemPickleTests): - - def dumps(self, arg, proto=0, fast=0): - from zodbpickle import pickle_2 - # Ignore fast - return pickle_2.dumps(arg, proto) - - def loads(self, buf): - from zodbpickle import pickle_2 - # Ignore fast - return pickle_2.loads(buf) - - -class cPickleBase(object): - - @property - def error(self): - from zodbpickle._pickle import BadPickleGet - return BadPickleGet - - -class cPickleTests(AbstractPickleTests, - AbstractPickleModuleTests, - cPickleBase, - ): - def setUp(self): - from zodbpickle._pickle import dumps - from zodbpickle._pickle import loads - self.dumps = dumps - self.loads = loads - - @property - def module(self): - from zodbpickle import _pickle - return _pickle - - -class cPicklePicklerTests(AbstractPickleTests, cPickleBase): - - def dumps(self, arg, proto=0): - from zodbpickle import _pickle - f = self.output() - try: - p = _pickle.Pickler(f, proto) - p.dump(arg) - f.seek(0) - return f.read() - finally: - self.close(f) - - def loads(self, buf): - from zodbpickle import _pickle - f = self.input(buf) - try: - p = _pickle.Unpickler(f) - return p.load() - finally: - self.close(f) - -class cStringIOCPicklerTests(cStringIOMixin, cPicklePicklerTests): - pass - -class BytesIOCPicklerTests(BytesIOMixin, cPicklePicklerTests): - pass - -class FileIOCPicklerTests(FileIOMixin, cPicklePicklerTests): - pass - - -class cPickleListPicklerTests(AbstractPickleTests, cPickleBase): - - def dumps(self, arg, proto=0): - from zodbpickle import _pickle - p = _pickle.Pickler(proto) - p.dump(arg) - return p.getvalue() - - def loads(self, *args): - from zodbpickle import _pickle - f = self.input(args[0]) - try: - p = _pickle.Unpickler(f) - return p.load() - finally: - self.close(f) - -class cStringIOCPicklerListTests(cStringIOMixin, cPickleListPicklerTests): - pass - -class BytesIOCPicklerListTests(BytesIOMixin, cPickleListPicklerTests): - pass - -class FileIOCPicklerListTests(FileIOMixin, cPickleListPicklerTests): - pass - - -class cPickleFastPicklerTests(AbstractPickleTests, cPickleBase): - - def dumps(self, arg, proto=0): - from zodbpickle import _pickle - f = self.output() - try: - p = _pickle.Pickler(f, proto) - p.fast = 1 - p.dump(arg) - f.seek(0) - return f.read() - finally: - self.close(f) - - def loads(self, *args): - from zodbpickle import _pickle - f = self.input(args[0]) - try: - p = _pickle.Unpickler(f) - return p.load() - finally: - self.close(f) - - def test_recursive_list(self): - self.assertRaises(ValueError, - AbstractPickleTests.test_recursive_list, - self) - - def test_recursive_tuple(self): - self.assertRaises(ValueError, - AbstractPickleTests.test_recursive_tuple, - self) - - def test_recursive_inst(self): - self.assertRaises(ValueError, - AbstractPickleTests.test_recursive_inst, - self) - - def test_recursive_dict(self): - self.assertRaises(ValueError, - AbstractPickleTests.test_recursive_dict, - self) - - def test_recursive_multi(self): - self.assertRaises(ValueError, - AbstractPickleTests.test_recursive_multi, - self) - - def test_nonrecursive_deep(self): - # If it's not cyclic, it should pickle OK even if the nesting - # depth exceeds PY_CPICKLE_FAST_LIMIT. That happens to be - # 50 today. Jack Jansen reported stack overflow on Mac OS 9 - # at 64. - a = [] - for i in range(60): - a = [a] - b = self.loads(self.dumps(a)) - self.assertEqual(a, b) - -class cStringIOCPicklerFastTests(cStringIOMixin, cPickleFastPicklerTests): - pass - -class BytesIOCPicklerFastTests(BytesIOMixin, cPickleFastPicklerTests): - pass - -class FileIOCPicklerFastTests(FileIOMixin, cPickleFastPicklerTests): - pass - - -class cPicklePicklerUnpicklerObjectTests(AbstractPicklerUnpicklerObjectTests): - - @property - def pickler_class(self): - from zodbpickle._pickle import Pickler - return Pickler - - @property - def unpickler_class(self): - from zodbpickle._pickle import Unpickler - return Unpickler - -class cPickleBigmemPickleTests(BigmemPickleTests): - - def dumps(self, arg, proto=0, fast=0): - from zodbpickle import _pickle - # Ignore fast - return _pickle.dumps(arg, proto) - - def loads(self, buf): - from zodbpickle import _pickle - # Ignore fast - return _pickle.loads(buf) - - -class Node(object): - pass - -class cPickleDeepRecursive(unittest.TestCase): - - def test_issue2702(self): - # This should raise a RecursionLimit but in some - # platforms (FreeBSD, win32) sometimes raises KeyError instead, - # or just silently terminates the interpreter (=crashes). - from zodbpickle import _pickle - nodes = [Node() for i in range(500)] - for n in nodes: - n.connections = list(nodes) - n.connections.remove(n) - self.assertRaises((AttributeError, RuntimeError), _pickle.dumps, n) - - def test_issue3179(self): - # Safe test, because I broke this case when fixing the - # behaviour for the previous test. - from zodbpickle import _pickle - res=[] - for x in range(1,2000): - res.append(dict(doc=x, similar=[])) - _pickle.dumps(res) - - -class BinaryTests(unittest.TestCase): - - def test_has_no_attrs(self): - from zodbpickle import binary - b = binary('abc') - with self.assertRaises(AttributeError): - setattr(b, 'attr', 42) - - def test_can_subclass(self): - from zodbpickle import binary - class MyBinary(binary): - pass - - my = MyBinary('') - my.attr = 42 - self.assertEqual(my, '') - self.assertEqual(my.attr, 42) - -class cBinaryTests(unittest.TestCase): - - def test_same_size(self): - # PyPy doesn't support sys.getsizeof, but - # we don't run these tests there. - import sys - from zodbpickle import binary - - s = b'abcdef' - b = binary(s) - self.assertEqual(sys.getsizeof(b), sys.getsizeof(s)) - - def test_not_tracked_by_gc(self): - # PyPy doesn't have gc.is_tracked, but we don't - # run these tests there. - import gc - from zodbpickle import binary - s = b'abcdef' - b = binary(s) - self.assertFalse(gc.is_tracked(s)) - self.assertFalse(gc.is_tracked(b)) - -def test_suite(): - tests = [ - unittest.makeSuite(PickleTests), - unittest.makeSuite(PicklerTests), - unittest.makeSuite(PersPicklerTests), - unittest.makeSuite(PicklerUnpicklerObjectTests), - unittest.makeSuite(PickleBigmemPickleTests), - unittest.makeSuite(BinaryTests), - ] - - if has_c_implementation: - tests.extend([ - unittest.makeSuite(cPickleTests), - unittest.makeSuite(cStringIOCPicklerTests), - unittest.makeSuite(BytesIOCPicklerTests), - unittest.makeSuite(FileIOCPicklerTests), - unittest.makeSuite(cStringIOCPicklerListTests), - unittest.makeSuite(BytesIOCPicklerListTests), - unittest.makeSuite(FileIOCPicklerListTests), - unittest.makeSuite(cStringIOCPicklerFastTests), - unittest.makeSuite(BytesIOCPicklerFastTests), - unittest.makeSuite(FileIOCPicklerFastTests), - unittest.makeSuite(cPickleDeepRecursive), - unittest.makeSuite(cPicklePicklerUnpicklerObjectTests), - unittest.makeSuite(cPickleBigmemPickleTests), - unittest.makeSuite(cBinaryTests), - ]) - return unittest.TestSuite(tests) - -if __name__ == '__main__': - test_support.run_unittest(test_suite()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/src/zodbpickle/tests/test_pickle_3.py new/zodbpickle-2.4/src/zodbpickle/tests/test_pickle_3.py --- old/zodbpickle-2.3/src/zodbpickle/tests/test_pickle_3.py 2022-04-22 08:18:59.000000000 +0200 +++ new/zodbpickle-2.4/src/zodbpickle/tests/test_pickle_3.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,192 +0,0 @@ -import io -import collections -import unittest -import doctest -from test import support as test_support - -from .pickletester_3 import AbstractPickleTests -from .pickletester_3 import AbstractPickleModuleTests -from .pickletester_3 import AbstractPersistentPicklerTests -from .pickletester_3 import AbstractPicklerUnpicklerObjectTests -from .pickletester_3 import AbstractDispatchTableTests -from .pickletester_3 import BigmemPickleTests -from .pickletester_3 import AbstractBytestrTests -from .pickletester_3 import AbstractBytesFallbackTests - -from . import _is_pypy -from . import _is_pure -from zodbpickle import pickle_3 as pickle -from zodbpickle import pickletools_3 as pickletools - -try: - from zodbpickle import _pickle - has_c_implementation = not _is_pypy and not _is_pure -except ImportError: - has_c_implementation = False - - -class PickleTests(AbstractPickleModuleTests): - pass - - -class PyPicklerBase(object): - - pickler = pickle._Pickler - unpickler = pickle._Unpickler - - def dumps(self, arg, proto=None, **kwds): - f = io.BytesIO() - p = self.pickler(f, proto, **kwds) - p.dump(arg) - f.seek(0) - return bytes(f.read()) - - def loads(self, buf, **kwds): - f = io.BytesIO(buf) - u = self.unpickler(f, **kwds) - return u.load() - -class PyPicklerTests(PyPicklerBase, AbstractPickleTests): - pass - -class PyPicklerBytestrTests(PyPicklerBase, AbstractBytestrTests): - pass - -class PyPicklerBytesFallbackTests(PyPicklerBase, AbstractBytesFallbackTests): - pass - -class InMemoryPickleTests(AbstractPickleTests, BigmemPickleTests): - - pickler = pickle._Pickler - unpickler = pickle._Unpickler - - def dumps(self, arg, protocol=None): - return pickle.dumps(arg, protocol) - - def loads(self, buf, **kwds): - return pickle.loads(buf, **kwds) - - -class PyPersPicklerTests(AbstractPersistentPicklerTests): - - pickler = pickle._Pickler - unpickler = pickle._Unpickler - - def dumps(self, arg, proto=None): - class PersPickler(self.pickler): - def persistent_id(subself, obj): - return self.persistent_id(obj) - f = io.BytesIO() - p = PersPickler(f, proto) - p.dump(arg) - f.seek(0) - return f.read() - - def loads(self, buf, **kwds): - class PersUnpickler(self.unpickler): - def persistent_load(subself, obj): - return self.persistent_load(obj) - f = io.BytesIO(buf) - u = PersUnpickler(f, **kwds) - return u.load() - - -class PyPicklerUnpicklerObjectTests(AbstractPicklerUnpicklerObjectTests): - - pickler_class = pickle._Pickler - unpickler_class = pickle._Unpickler - - -class PyDispatchTableTests(AbstractDispatchTableTests): - pickler_class = pickle._Pickler - - def get_dispatch_table(self): - return pickle.dispatch_table.copy() - - -class PyChainDispatchTableTests(AbstractDispatchTableTests): - pickler_class = pickle._Pickler - - def get_dispatch_table(self): - return collections.ChainMap({}, pickle.dispatch_table) - - -if has_c_implementation: - class CPicklerTests(PyPicklerTests): - pickler = _pickle.Pickler - unpickler = _pickle.Unpickler - - class CPicklerBytestrTests(PyPicklerBytestrTests): - pickler = _pickle.Pickler - unpickler = _pickle.Unpickler - - class CPicklerBytesFallbackTests(PyPicklerBytesFallbackTests): - pickler = _pickle.Pickler - unpickler = _pickle.Unpickler - - class CPersPicklerTests(PyPersPicklerTests): - pickler = _pickle.Pickler - unpickler = _pickle.Unpickler - - class CDumpPickle_LoadPickle(PyPicklerTests): - pickler = _pickle.Pickler - unpickler = pickle._Unpickler - - class DumpPickle_CLoadPickle(PyPicklerTests): - pickler = pickle._Pickler - unpickler = _pickle.Unpickler - - class CPicklerUnpicklerObjectTests(AbstractPicklerUnpicklerObjectTests): - pickler_class = _pickle.Pickler - unpickler_class = _pickle.Unpickler - - class CDispatchTableTests(AbstractDispatchTableTests): - pickler_class = pickle.Pickler - - def get_dispatch_table(self): - return pickle.dispatch_table.copy() - - class CChainDispatchTableTests(AbstractDispatchTableTests): - pickler_class = pickle.Pickler - - def get_dispatch_table(self): - return collections.ChainMap({}, pickle.dispatch_table) - - -def choose_tests(): - tests = [ - PickleTests, - PyPicklerTests, - PyPersPicklerTests, - PyPicklerBytestrTests, - PyPicklerBytesFallbackTests, - PyDispatchTableTests, - PyChainDispatchTableTests, - ] - if has_c_implementation: - tests.extend([ - CPicklerTests, - CPersPicklerTests, - CPicklerBytestrTests, - CPicklerBytesFallbackTests, - CDumpPickle_LoadPickle, - DumpPickle_CLoadPickle, - PyPicklerUnpicklerObjectTests, - CPicklerUnpicklerObjectTests, - InMemoryPickleTests, - CDispatchTableTests, - CChainDispatchTableTests, - ]) - return tests - - -def test_suite(): - return unittest.TestSuite([ - unittest.makeSuite(t) for t in choose_tests() - ] + [ - doctest.DocTestSuite(pickle), - doctest.DocTestSuite(pickletools), - ]) - -if __name__ == '__main__': - test_support.run_unittest(test_suite()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/src/zodbpickle.egg-info/PKG-INFO new/zodbpickle-2.4/src/zodbpickle.egg-info/PKG-INFO --- old/zodbpickle-2.3/src/zodbpickle.egg-info/PKG-INFO 2022-04-22 08:19:01.000000000 +0200 +++ new/zodbpickle-2.4/src/zodbpickle.egg-info/PKG-INFO 2022-09-15 08:24:38.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: zodbpickle -Version: 2.3 +Version: 2.4 Summary: Fork of Python 2 and 3 pickle module. Home-page: https://github.com/zopefoundation/zodbpickle Author: Python and Zope Foundation @@ -36,8 +36,8 @@ ``zodbpickle`` README ===================== -.. image:: https://travis-ci.com/zopefoundation/zodbpickle.svg?branch=master - :target: https://travis-ci.com/zopefoundation/zodbpickle +.. image:: https://github.com/zopefoundation/zodbpickle/actions/workflows/tests.yml/badge.svg + :target: https://github.com/zopefoundation/zodbpickle/actions/workflows/tests.yml .. image:: https://coveralls.io/repos/github/zopefoundation/zodbpickle/badge.svg :target: https://coveralls.io/github/zopefoundation/zodbpickle @@ -204,6 +204,15 @@ Changelog =========== +2.4 (2022-09-15) +================ + +- Add support for Python 3.11 (as of 3.11.0b3). + +- Disable unsafe math optimizations in C code. See `pull request 73 + <https://github.com/zopefoundation/zodbpickle/pull/73>`_. + + 2.3 (2022-04-22) ================ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/src/zodbpickle.egg-info/SOURCES.txt new/zodbpickle-2.4/src/zodbpickle.egg-info/SOURCES.txt --- old/zodbpickle-2.3/src/zodbpickle.egg-info/SOURCES.txt 2022-04-22 08:19:01.000000000 +0200 +++ new/zodbpickle-2.4/src/zodbpickle.egg-info/SOURCES.txt 2022-09-15 08:24:38.000000000 +0200 @@ -30,8 +30,9 @@ src/zodbpickle.egg-info/requires.txt src/zodbpickle.egg-info/top_level.txt src/zodbpickle/tests/__init__.py +src/zodbpickle/tests/pickle_2_tests.py +src/zodbpickle/tests/pickle_3_tests.py src/zodbpickle/tests/pickletester_2.py src/zodbpickle/tests/pickletester_3.py -src/zodbpickle/tests/test_pickle.py -src/zodbpickle/tests/test_pickle_2.py -src/zodbpickle/tests/test_pickle_3.py \ No newline at end of file +src/zodbpickle/tests/test_compile_flags.py +src/zodbpickle/tests/test_pickle.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zodbpickle-2.3/tox.ini new/zodbpickle-2.4/tox.ini --- old/zodbpickle-2.3/tox.ini 2022-04-22 08:18:59.000000000 +0200 +++ new/zodbpickle-2.4/tox.ini 2022-09-15 08:24:37.000000000 +0200 @@ -18,18 +18,13 @@ [testenv] usedevelop = true -pip_pre = true +pip_pre = py311: true deps = setenv = pure: PURE_PYTHON=1 !pure-!pypy-!pypy3: PURE_PYTHON=0 commands = - # there's test_pickle_2 for Python 2 and test_pickle_3 for Python 3 - # different test files because metaclass syntax differs on Pythons - # test_pickle picks and returns the appropriate one - # without this we'd get an import error (actually syntax error) for one - # of them - zope-testrunner --test-path=src -m zodbpickle.tests.test_pickle$ {posargs:-vc} + zope-testrunner --test-path=src {posargs:-vc} extras = test @@ -43,7 +38,7 @@ PURE_PYTHON=1 commands = mkdir -p {toxinidir}/parts/htmlcov - coverage run -m zope.testrunner --test-path=src -m zodbpickle.tests.test_pickle$ {posargs:-vc} + coverage run -m zope.testrunner --test-path=src {posargs:-vc} coverage html -i coverage report -i -m --fail-under=63