tox: v↑ everything
- start testing NEO with ZODB4 and ZODB5. ZODB4-*-NEO works while ZODB5-*-NEO currently fails [1]. - update NumPy to latest releases. - update Python 3 to latest releases.
-
Owner
@jm, FYI, I've tried to run Wendelin.core tests with all ZODB versions, and while it works with ZODB{3,4}-ZEO, ZODB{3,4}-NEO and ZODB5-ZEO5, for ZODB5-NEO it stably breaks:
$ (venv) kirr@deco:~/src/wendelin/r/try/wendelin.core-0.12$ tox ... py27-ZODB3-zblk0-fs-numpy113: commands succeeded py27-ZODB3-zblk0-fs-numpy114: commands succeeded py27-ZODB3-zblk0-zeo-numpy113: commands succeeded py27-ZODB3-zblk0-zeo-numpy114: commands succeeded py27-ZODB3-zblk0-neo-numpy113: commands succeeded py27-ZODB3-zblk0-neo-numpy114: commands succeeded py27-ZODB3-zblk1-fs-numpy113: commands succeeded py27-ZODB3-zblk1-fs-numpy114: commands succeeded py27-ZODB3-zblk1-zeo-numpy113: commands succeeded py27-ZODB3-zblk1-zeo-numpy114: commands succeeded py27-ZODB3-zblk1-neo-numpy113: commands succeeded py27-ZODB3-zblk1-neo-numpy114: commands succeeded py27-ZODB4-zblk0-fs-numpy113: commands succeeded py27-ZODB4-zblk0-fs-numpy114: commands succeeded py27-ZODB4-zblk0-zeo-numpy113: commands succeeded py27-ZODB4-zblk0-zeo-numpy114: commands succeeded py27-ZODB4-zblk0-neo-numpy113: commands succeeded py27-ZODB4-zblk0-neo-numpy114: commands succeeded py27-ZODB4-zblk1-fs-numpy113: commands succeeded py27-ZODB4-zblk1-fs-numpy114: commands succeeded py27-ZODB4-zblk1-zeo-numpy113: commands succeeded py27-ZODB4-zblk1-zeo-numpy114: commands succeeded py27-ZODB4-zblk1-neo-numpy113: commands succeeded py27-ZODB4-zblk1-neo-numpy114: commands succeeded py27-ZODB5-zblk0-fs-numpy113: commands succeeded py27-ZODB5-zblk0-fs-numpy114: commands succeeded py27-ZODB5-zblk0-zeo-numpy113: commands succeeded py27-ZODB5-zblk0-zeo-numpy114: commands succeeded ERROR: py27-ZODB5-zblk0-neo-numpy113: commands failed ERROR: py27-ZODB5-zblk0-neo-numpy114: commands failed py27-ZODB5-zblk1-fs-numpy113: commands succeeded py27-ZODB5-zblk1-fs-numpy114: commands succeeded py27-ZODB5-zblk1-zeo-numpy113: commands succeeded py27-ZODB5-zblk1-zeo-numpy114: commands succeeded ERROR: py27-ZODB5-zblk1-neo-numpy113: commands failed ERROR: py27-ZODB5-zblk1-neo-numpy114: commands failed py35-ZODB4-zblk0-fs-numpy113: commands succeeded py35-ZODB4-zblk0-fs-numpy114: commands succeeded py35-ZODB4-zblk0-zeo-numpy113: commands succeeded py35-ZODB4-zblk0-zeo-numpy114: commands succeeded py35-ZODB4-zblk1-fs-numpy113: commands succeeded py35-ZODB4-zblk1-fs-numpy114: commands succeeded py35-ZODB4-zblk1-zeo-numpy113: commands succeeded py35-ZODB4-zblk1-zeo-numpy114: commands succeeded py35-ZODB5-zblk0-fs-numpy113: commands succeeded py35-ZODB5-zblk0-fs-numpy114: commands succeeded py35-ZODB5-zblk0-zeo-numpy113: commands succeeded py35-ZODB5-zblk0-zeo-numpy114: commands succeeded py35-ZODB5-zblk1-fs-numpy113: commands succeeded py35-ZODB5-zblk1-fs-numpy114: commands succeeded py35-ZODB5-zblk1-zeo-numpy113: commands succeeded py35-ZODB5-zblk1-zeo-numpy114: commands succeeded py36-ZODB4-zblk0-fs-numpy113: commands succeeded py36-ZODB4-zblk0-fs-numpy114: commands succeeded py36-ZODB4-zblk0-zeo-numpy113: commands succeeded py36-ZODB4-zblk0-zeo-numpy114: commands succeeded py36-ZODB4-zblk1-fs-numpy113: commands succeeded py36-ZODB4-zblk1-fs-numpy114: commands succeeded py36-ZODB4-zblk1-zeo-numpy113: commands succeeded py36-ZODB4-zblk1-zeo-numpy114: commands succeeded py36-ZODB5-zblk0-fs-numpy113: commands succeeded py36-ZODB5-zblk0-fs-numpy114: commands succeeded py36-ZODB5-zblk0-zeo-numpy113: commands succeeded py36-ZODB5-zblk0-zeo-numpy114: commands succeeded py36-ZODB5-zblk1-fs-numpy113: commands succeeded py36-ZODB5-zblk1-fs-numpy114: commands succeeded py36-ZODB5-zblk1-zeo-numpy113: commands succeeded py36-ZODB5-zblk1-zeo-numpy114: commands succeeded
Not sure it is not my fault, but it is better you have a look too. Example of one failure:
py27-ZODB5-zblk1-neo-numpy113 create: /home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113 py27-ZODB5-zblk1-neo-numpy113 installdeps: pytest, ZODB >=5.0, <6.0dev, ZEO >=5.0, <6.0dev, neoppod >= 1.9, mysqlclient, numpy >=1.13.0, <1.14.0 py27-ZODB5-zblk1-neo-numpy113 inst: /home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/dist/wendelin.core-0.12.zip py27-ZODB5-zblk1-neo-numpy113 installed: attrs==17.4.0,BTrees==4.4.1,funcsigs==1.0.2,futures==3.2.0,more-itertools==4.1.0,mysqlclient==1.3.12,neoppod==1.9,numpy==1.13.3,persistent==4.2.4.2,pkg-resources==0.0.0,pluggy==0.6.0,psutil==5.4.5,py==1.5.3,pytest==3.5.0,python-dateutil==2.7.2,six==1.11.0,transaction==2.2.1,trollius==2.2,wendelin.core==0.12,zc.lockfile==1.2.1,ZConfig==3.2.0,zdaemon==4.2.0,ZEO==5.2.0,ZODB==5.4.0,ZODB3==3.11.0,zodbpickle==1.0,zope.interface==4.4.3 py27-ZODB5-zblk1-neo-numpy113 runtests: PYTHONHASHSEED='2650620925' py27-ZODB5-zblk1-neo-numpy113 runtests: commands[0] | /home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/bin/python setup.py test running test /home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/bin/python setup.py ll_build_ext --inplace running ll_build_ext copying build/lib.linux-x86_64-2.7/wendelin/bigfile/_bigfile.so -> bigfile /home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/bin/python -m pytest --ignore=3rdparty --ignore=build --ignore=t ========================================================================================== test session starts ========================================================================================== platform linux2 -- Python 2.7.14+, pytest-3.5.0, py-1.5.3, pluggy-0.6.0 rootdir: /home/kirr/src/wendelin/r/try/wendelin.core-0.12, inifile: collected 37 items bigarray/tests/test_arrayzodb.py FF..... [ 18%] bigarray/tests/test_basic.py .......... [ 45%] bigfile/tests/test_basic.py ..... [ 59%] bigfile/tests/test_filefile.py . [ 62%] bigfile/tests/test_filezodb.py FF...FFF [ 83%] bigfile/tests/test_thread.py .... [ 94%] lib/tests/test_calc.py . [ 97%] lib/tests/test_zodb.py F [100%] =============================================================================================== FAILURES ================================================================================================ ____________________________________________________________________________________________ test_zbigarray _____________________________________________________________________________________________ def test_zbigarray(): root = testdb.dbopen() root['zarray'] = ZBigArray((16*1024*1024,), uint8) transaction.commit() dbclose(root) del root root = testdb.dbopen() A = root['zarray'] assert isinstance(A, ZBigArray) > assert A.shape == (16*1024*1024,) bigarray/tests/test_arrayzodb.py:58: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py:791: in setstate p, serial = self._storage.load(oid) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/mvccadapter.py:143: in load r = self._storage.loadBefore(oid, self._start) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/Storage.py:119: in loadBefore return self.app.load(oid, None, tid) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/app.py:363: in load data, tid, next_tid, _ = self._loadFromStorage(oid, tid, before_tid) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/app.py:395: in _loadFromStorage askStorage) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/app.py:285: in _askStorageForRead cell_list = pt.getCellList(object_id, True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <neo.lib.pt.MTPartitionTable object at 0x7f6db4bbd750>, offset = '\x00\x00\x00\x00\x00\x00\x00\x01', readable = True def getCellList(self, offset, readable=False): if readable: > return filter(Cell.isReadable, self.partition_list[offset]) E TypeError: list indices must be integers, not binary .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/lib/pt.py:143: TypeError ----------------------------------------------------------------------------------------- Captured stdout setup ----------------------------------------------------------------------------------------- Using temp directory '/tmp/neo_tests/1523886487.708884'. Using temp directory /tmp/neo_nmGBMT ------------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------------- Connection.py 809 ERROR Couldn't load state for wendelin.bigarray.array_zodb.ZBigArray 0x01 Traceback (most recent call last): File "/home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py", line 791, in setstate p, serial = self._storage.load(oid) File "/home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/mvccadapter.py", line 143, in load r = self._storage.loadBefore(oid, self._start) File "/home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/Storage.py", line 119, in loadBefore return self.app.load(oid, None, tid) File "/home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/app.py", line 363, in load data, tid, next_tid, _ = self._loadFromStorage(oid, tid, before_tid) File "/home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/app.py", line 395, in _loadFromStorage askStorage) File "/home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/app.py", line 285, in _askStorageForRead cell_list = pt.getCellList(object_id, True) File "/home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/lib/pt.py", line 143, in getCellList return filter(Cell.isReadable, self.partition_list[offset]) TypeError: list indices must be integers, not binary _________________________________________________________________________________________ test_zbigarray_order __________________________________________________________________________________________ def test_zbigarray_order(): # make sure order is properly saved/restored to/from DB root = testdb.dbopen() root['carray'] = ZBigArray((16*1024*1024,), uint8) root['farray'] = ZBigArray((16*1024*1024,), uint8, order='F') transaction.commit() dbclose(root) del root root = testdb.dbopen() C = root['carray'] F = root['farray'] assert isinstance(C, ZBigArray) > assert C.shape == (16*1024*1024,) bigarray/tests/test_arrayzodb.py:213: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py:791: in setstate p, serial = self._storage.load(oid) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/mvccadapter.py:143: in load r = self._storage.loadBefore(oid, self._start) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/Storage.py:119: in loadBefore return self.app.load(oid, None, tid) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/app.py:363: in load data, tid, next_tid, _ = self._loadFromStorage(oid, tid, before_tid) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/app.py:395: in _loadFromStorage askStorage) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/app.py:285: in _askStorageForRead cell_list = pt.getCellList(object_id, True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <neo.lib.pt.MTPartitionTable object at 0x7f6da3a7ab10>, offset = '\x00\x00\x00\x00\x00\x00\x00e', readable = True def getCellList(self, offset, readable=False): if readable: > return filter(Cell.isReadable, self.partition_list[offset]) E TypeError: list indices must be integers, not binary .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/lib/pt.py:143: TypeError ------------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------------- Connection.py 809 ERROR Couldn't load state for wendelin.bigarray.array_zodb.ZBigArray 0x65 Traceback (most recent call last): File "/home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py", line 791, in setstate p, serial = self._storage.load(oid) File "/home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/mvccadapter.py", line 143, in load r = self._storage.loadBefore(oid, self._start) File "/home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/Storage.py", line 119, in loadBefore return self.app.load(oid, None, tid) File "/home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/app.py", line 363, in load data, tid, next_tid, _ = self._loadFromStorage(oid, tid, before_tid) File "/home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/app.py", line 395, in _loadFromStorage askStorage) File "/home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/app.py", line 285, in _askStorageForRead cell_list = pt.getCellList(object_id, True) File "/home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/lib/pt.py", line 143, in getCellList return filter(Cell.isReadable, self.partition_list[offset]) TypeError: list indices must be integers, not binary __________________________________________________________________________________________ test_livepersistent __________________________________________________________________________________________ def test_livepersistent(): root = dbopen() > transaction.commit() # set root._p_jar bigfile/tests/test_filezodb.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_manager.py:131: in commit return self.get().commit() .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_transaction.py:316: in commit self._synchronizers.map(lambda s: s.afterCompletion(self)) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/weakset.py:62: in map f(elt) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_transaction.py:316: in <lambda> self._synchronizers.map(lambda s: s.afterCompletion(self)) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py:757: in afterCompletion self.newTransaction(transaction, False) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py:737: in newTransaction invalidated = self._storage.poll_invalidations() .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/mvccadapter.py:131: in poll_invalidations self._start = p64(u64(self._storage.lastTransaction()) + 1) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <neo.client.Storage.Storage object at 0x7f6da3a7a090> def lastTransaction(self): # Used in ZODB unit tests > return self.app.last_tid E AttributeError: 'NoneType' object has no attribute 'last_tid' .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/Storage.py:181: AttributeError ----------------------------------------------------------------------------------------- Captured stdout setup ----------------------------------------------------------------------------------------- Using temp directory /tmp/neo_smOdwv _________________________________________________________________________________________ test_bigfile_filezodb _________________________________________________________________________________________ def test_bigfile_filezodb(): root = dbopen() root['zfile'] = f = ZBigFile(blksize) > transaction.commit() bigfile/tests/test_filezodb.py:219: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_manager.py:131: in commit return self.get().commit() .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_transaction.py:316: in commit self._synchronizers.map(lambda s: s.afterCompletion(self)) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/weakset.py:62: in map f(elt) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_transaction.py:316: in <lambda> self._synchronizers.map(lambda s: s.afterCompletion(self)) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py:757: in afterCompletion self.newTransaction(transaction, False) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py:737: in newTransaction invalidated = self._storage.poll_invalidations() .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/mvccadapter.py:131: in poll_invalidations self._start = p64(u64(self._storage.lastTransaction()) + 1) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <neo.client.Storage.Storage object at 0x7f6da3a7a090> def lastTransaction(self): # Used in ZODB unit tests > return self.app.last_tid E AttributeError: 'NoneType' object has no attribute 'last_tid' .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/Storage.py:181: AttributeError ____________________________________________________________________________________ test_bigfile_filezodb_fileh_gc _____________________________________________________________________________________ def test_bigfile_filezodb_fileh_gc(): root1= dbopen() conn1= root1._p_jar db = conn1.db() root1['zfile4'] = f1 = ZBigFile(blksize) > transaction.commit() bigfile/tests/test_filezodb.py:685: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_manager.py:131: in commit return self.get().commit() .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_transaction.py:316: in commit self._synchronizers.map(lambda s: s.afterCompletion(self)) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/weakset.py:62: in map f(elt) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_transaction.py:316: in <lambda> self._synchronizers.map(lambda s: s.afterCompletion(self)) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py:757: in afterCompletion self.newTransaction(transaction, False) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py:737: in newTransaction invalidated = self._storage.poll_invalidations() .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/mvccadapter.py:131: in poll_invalidations self._start = p64(u64(self._storage.lastTransaction()) + 1) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <neo.client.Storage.Storage object at 0x7f6da3a7a090> def lastTransaction(self): # Used in ZODB unit tests > return self.app.last_tid E AttributeError: 'NoneType' object has no attribute 'last_tid' .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/Storage.py:181: AttributeError ___________________________________________________________________________________ test_bigfile_filezodb_fmt_change ____________________________________________________________________________________ def test_bigfile_filezodb_fmt_change(): root = dbopen() root['zfile5'] = f = ZBigFile(blksize) > transaction.commit() bigfile/tests/test_filezodb.py:714: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_manager.py:131: in commit return self.get().commit() .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_transaction.py:316: in commit self._synchronizers.map(lambda s: s.afterCompletion(self)) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/weakset.py:62: in map f(elt) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_transaction.py:316: in <lambda> self._synchronizers.map(lambda s: s.afterCompletion(self)) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py:757: in afterCompletion self.newTransaction(transaction, False) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py:737: in newTransaction invalidated = self._storage.poll_invalidations() .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/mvccadapter.py:131: in poll_invalidations self._start = p64(u64(self._storage.lastTransaction()) + 1) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <neo.client.Storage.Storage object at 0x7f6da3a7a090> def lastTransaction(self): # Used in ZODB unit tests > return self.app.last_tid E AttributeError: 'NoneType' object has no attribute 'last_tid' .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/Storage.py:181: AttributeError ____________________________________________________________________________________ test_bigfile_zblk1_zdata_reuse _____________________________________________________________________________________ def test_bigfile_zblk1_zdata_reuse(): # set ZBlk_fmt_write to ZBlk1 for this test fmt_write_save = file_zodb.ZBlk_fmt_write file_zodb.ZBlk_fmt_write = 'ZBlk1' try: > _test_bigfile_zblk1_zdata_reuse() bigfile/tests/test_filezodb.py:754: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ bigfile/tests/test_filezodb.py:761: in _test_bigfile_zblk1_zdata_reuse transaction.commit() .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_manager.py:131: in commit return self.get().commit() .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_transaction.py:316: in commit self._synchronizers.map(lambda s: s.afterCompletion(self)) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/weakset.py:62: in map f(elt) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_transaction.py:316: in <lambda> self._synchronizers.map(lambda s: s.afterCompletion(self)) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py:757: in afterCompletion self.newTransaction(transaction, False) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py:737: in newTransaction invalidated = self._storage.poll_invalidations() .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/mvccadapter.py:131: in poll_invalidations self._start = p64(u64(self._storage.lastTransaction()) + 1) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <neo.client.Storage.Storage object at 0x7f6da3a7a090> def lastTransaction(self): # Used in ZODB unit tests > return self.app.last_tid E AttributeError: 'NoneType' object has no attribute 'last_tid' .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/Storage.py:181: AttributeError ----------------------------------------------------------------------------------------- Captured log teardown ----------------------------------------------------------------------------------------- master.py 100 CRITICAL connection to primary master node closed master.py 100 CRITICAL connection to primary master node closed master.py 100 CRITICAL connection to primary master node closed master.py 100 CRITICAL connection to primary master node closed master.py 100 CRITICAL connection to primary master node closed _________________________________________________________________________________________ test_deactivate_btree _________________________________________________________________________________________ def test_deactivate_btree(): root = dbopen() # init btree with many leaf nodes leafv = [] root['btree'] = B = IOBTree() for i in range(10000): B[i] = xi = XInt(i) leafv.append(xi) > transaction.commit() lib/tests/test_zodb.py:56: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_manager.py:131: in commit return self.get().commit() .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_transaction.py:316: in commit self._synchronizers.map(lambda s: s.afterCompletion(self)) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/weakset.py:62: in map f(elt) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/transaction/_transaction.py:316: in <lambda> self._synchronizers.map(lambda s: s.afterCompletion(self)) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py:757: in afterCompletion self.newTransaction(transaction, False) .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/Connection.py:737: in newTransaction invalidated = self._storage.poll_invalidations() .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/ZODB/mvccadapter.py:131: in poll_invalidations self._start = p64(u64(self._storage.lastTransaction()) + 1) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <neo.client.Storage.Storage object at 0x7f6da3a7a090> def lastTransaction(self): # Used in ZODB unit tests > return self.app.last_tid E AttributeError: 'NoneType' object has no attribute 'last_tid' .tox/py27-ZODB5-zblk1-neo-numpy113/lib/python2.7/site-packages/neo/client/Storage.py:181: AttributeError ----------------------------------------------------------------------------------------- Captured stdout setup ----------------------------------------------------------------------------------------- Using temp directory /tmp/neo_lEdoc3 ----------------------------------------------------------------------------------------- Captured log teardown ----------------------------------------------------------------------------------------- master.py 100 CRITICAL connection to primary master node closed ================================================================================= 8 failed, 29 passed in 23.31 seconds ================================================================================== Exception AttributeError: "'NoneType' object has no attribute 'close'" in <bound method NEOCluster.__del__ of <neo.tests.functional.NEOCluster object at 0x7f6da5086090>> ignored Exception TypeError: 'expected string or buffer' in <bound method NEOCluster.__del__ of <neo.tests.functional.NEOCluster object at 0x7f6da39caf50>> ignored Exception TypeError: 'expected string or buffer' in <bound method NEOCluster.__del__ of <neo.tests.functional.NEOCluster object at 0x7f6da4e9d2d0>> ignored Makefile:174: ошибка выполнения рецепта для цели «test.py» make: *** [test.py] Ошибка 1 error: Failed to execute `make test` ERROR: InvocationError: '/home/kirr/src/wendelin/r/try/wendelin.core-0.12/.tox/py27-ZODB5-zblk1-neo-numpy113/bin/python setup.py test'
-
Owner
Can you test the 'zodb5' branch of NEO ?
-
Owner
@jm thanks for feedback. With
zodb5
branch it looks better, but there is still 1 failure:(z5) kirr@deco:~/src/wendelin/wendelin.core$ pip list Package Version Location --------------- ------------------ ---------------------------------------------- attrs 17.4.0 bcc 0.3.0.post11686367 BTrees 4.4.1 funcsigs 1.0.2 futures 3.2.0 more-itertools 4.1.0 mysqlclient 1.3.12 neoppod 1.9 /home/kirr/src/neo/src/lab.nexedi.com/kirr/neo numpy 1.14.2 persistent 4.2.4.2 pip 10.0.0 pkg-resources 0.0.0 pluggy 0.6.0 psutil 5.4.5 py 1.5.3 pytest 3.5.0 python-dateutil 2.7.2 setuptools 39.0.1 six 1.11.0 transaction 2.2.1 trollius 2.2 wendelin.core 0.12 /home/kirr/src/wendelin/wendelin.core wheel 0.31.0 zc.lockfile 1.2.1 ZConfig 3.2.0 zdaemon 4.2.0 ZEO 5.2.0 ZODB 5.4.0 ZODB3 3.11.0 zodbpickle 1.0 zope.interface 4.4.3 zope.testing 4.6.2
(z5) kirr@deco:~/src/wendelin/wendelin.core$ WENDELIN_CORE_TEST_DB="<neo>" make test.py python setup.py ll_build_ext --inplace running ll_build_ext copying build/lib.linux-x86_64-2.7/wendelin/bigfile/_bigfile.so -> bigfile python -m pytest --ignore=3rdparty --ignore=build --ignore=t ================================================== test session starts ================================================== platform linux2 -- Python 2.7.14+, pytest-3.5.0, py-1.5.3, pluggy-0.6.0 rootdir: /home/kirr/src/wendelin/wendelin.core, inifile: collected 37 items bigarray/tests/test_arrayzodb.py ....... [ 18%] bigarray/tests/test_basic.py .......... [ 45%] bigfile/tests/test_basic.py ..... [ 59%] bigfile/tests/test_filefile.py . [ 62%] bigfile/tests/test_filezodb.py ........ [ 83%] bigfile/tests/test_thread.py .... [ 94%] lib/tests/test_calc.py . [ 97%] lib/tests/test_zodb.py F [100%] ======================================================= FAILURES ======================================================== _________________________________________________ test_deactivate_btree _________________________________________________ def test_deactivate_btree(): root = dbopen() # init btree with many leaf nodes leafv = [] root['btree'] = B = IOBTree() for i in range(10000): B[i] = xi = XInt(i) leafv.append(xi) > transaction.commit() lib/tests/test_zodb.py:56: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../venv/z5/local/lib/python2.7/site-packages/transaction/_manager.py:131: in commit return self.get().commit() ../venv/z5/local/lib/python2.7/site-packages/transaction/_transaction.py:316: in commit self._synchronizers.map(lambda s: s.afterCompletion(self)) ../venv/z5/local/lib/python2.7/site-packages/transaction/weakset.py:62: in map f(elt) ../venv/z5/local/lib/python2.7/site-packages/transaction/_transaction.py:316: in <lambda> self._synchronizers.map(lambda s: s.afterCompletion(self)) ../venv/z5/local/lib/python2.7/site-packages/ZODB/Connection.py:757: in afterCompletion self.newTransaction(transaction, False) ../venv/z5/local/lib/python2.7/site-packages/ZODB/Connection.py:737: in newTransaction invalidated = self._storage.poll_invalidations() ../venv/z5/local/lib/python2.7/site-packages/ZODB/mvccadapter.py:131: in poll_invalidations self._start = p64(u64(self._storage.lastTransaction()) + 1) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <neo.client.Storage.Storage object at 0x7fc221bdd290> def lastTransaction(self): # Used in ZODB unit tests > return self.app.last_tid E AttributeError: 'NoneType' object has no attribute 'last_tid' ../../neo/src/lab.nexedi.com/kirr/neo/neo/client/Storage.py:181: AttributeError ------------------------------------------------- Captured stdout setup ------------------------------------------------- Using temp directory /tmp/neo_wp4xUo ------------------------------------------------- Captured log teardown ------------------------------------------------- master.py 100 CRITICAL connection to primary master node closed ========================================= 1 failed, 36 passed in 46.65 seconds ========================================== Exception TypeError: 'expected string or buffer' in <bound method NEOCluster.__del__ of <neo.tests.functional.NEOCluster object at 0x7fc222b9b350>> ignored Exception TypeError: 'expected string or buffer' in <bound method NEOCluster.__del__ of <neo.tests.functional.NEOCluster object at 0x7fc221bdd410>> ignored Exception TypeError: 'expected string or buffer' in <bound method NEOCluster.__del__ of <neo.tests.functional.NEOCluster object at 0x7fc221be7490>> ignored Makefile:173: ошибка выполнения рецепта для цели «test.py» make: *** [test.py] Ошибка 1
-
Owner
self.app
should not beNone
: it seems thatStorage.close
was called unexpectedly. Can you add a breakpoint and get the traceback to see why it's called ? -
Owner
@jm, I of course could do it, but maybe it makes more sense just to reproduce the issue on your side? The command to run tests is:
$ WENDELIN_CORE_TEST_DB="<neo>" make test.py
and initial environment is easy to prepare with
virtualenv
andpip
in 3 - 5 minutes.Does the breakage reproduce on your side?
-
Owner
Ouch no. Too heavy for me. Fortunately, it was easy to reduce
testing.py
andtest_zodb
to something of ~70 lines. I tested by running the beginning oftest_deactivate_btree
2 times, with your whole setup/teardown code around each call. If I also addprint self, self.app
at the beginning ofStorage.lastTransaction
, we see:Using temp directory '/tmp/neo_tests/1523904777.938541'. Using temp directory /tmp/neo_x5jcmP <neo.client.Storage.Storage object at 0x7f76134d8b90> <neo.client.Storage.Storage object at 0x7f76134d8b90> <neo.client.app.Application object at 0x7f760cfe09d0> <neo.client.Storage.Storage object at 0x7f76134d8b90> <neo.client.app.Application object at 0x7f760cfe09d0> <neo.client.Storage.Storage object at 0x7f76134d8b90> <neo.client.app.Application object at 0x7f760cfe09d0> <neo.client.Storage.Storage object at 0x7f76134d8b90> <neo.client.app.Application object at 0x7f760cfe09d0> <neo.client.Storage.Storage object at 0x7f76134d8b90> <neo.client.app.Application object at 0x7f760cfe09d0> Using temp directory /tmp/neo_jUi06h <neo.client.Storage.Storage object at 0x7f760cfc82d0> <neo.client.Storage.Storage object at 0x7f760cfc82d0> <neo.client.app.Application object at 0x7f760cfb9410> <neo.client.Storage.Storage object at 0x7f760cfc82d0> <neo.client.app.Application object at 0x7f760cfb9410> <neo.client.Storage.Storage object at 0x7f760cfc82d0> <neo.client.app.Application object at 0x7f760cfb9410> <neo.client.Storage.Storage object at 0x7f760cfc82d0> <neo.client.app.Application object at 0x7f760cfb9410> <neo.client.Storage.Storage object at 0x7f76134d8b90> None Traceback (most recent call last): ...
Which means that it keeps using a Storage object of a previous test. Note also that before Review Connection/DB closure , we get the following traceback:
Traceback (most recent call last): File "../zodb5/bin/python", line 41, in <module> exec(compile(__file__f.read(), __file__, "exec")) File "test.py", line 69, in <module> test_deactivate_btree() File "test.py", line 63, in test_deactivate_btree transaction.commit() File "transaction/_manager.py", line 124, in commit return self.get().commit() File "transaction/_transaction.py", line 316, in commit self._synchronizers.map(lambda s: s.afterCompletion(self)) File "transaction/weakset.py", line 62, in map f(elt) File "transaction/_transaction.py", line 316, in <lambda> self._synchronizers.map(lambda s: s.afterCompletion(self)) File "ZODB/Connection.py", line 762, in afterCompletion self.newTransaction(transaction, False) File "ZODB/Connection.py", line 747, in newTransaction assert self._storage is None AssertionError
About my question above, the storage is obviously closed by functional.NEOCluster itself. It's "luck" if it does not fail with other ZODB storages.
I already suspected something wrong in the way you use ZODB. I suggest to close the DB explicitly in teardown.
-
Owner
If I also add
print self, self.app
at the beginning ofStorage.lastTransaction
(... and a
print stor
inTestDB_Base.dbopen
) -
Owner
Too heavy?? Anyway, you are right that connections from previous test could be left there alive, and since transaction keeps weak references to them and invoke at synchronization points (e.g. at
transaction.commit()
) this could lead to situations when connection tries to use closed storage.I've pushed up the following fixes: kirr/wendelin.core@5a5ed2c7, kirr/wendelin.core@01b995a4.