Fix occasional RuntimeErrors in transaction.weakset on Python 3
One way to reproduce these in the wild was to run the ZODB test suite on Python 3.3 in the py3 branch. Example failure: Error in test checkPackWhileWriting (ZODB.tests.testMVCCMappingStorage.MVCCMappingStorageTests) Traceback (most recent call last): File "/usr/lib/python3.3/unittest/case.py", line 385, in _executeTestPart function() File "/home/mg/src/new-zope-order/ZODB/src/ZODB/tests/PackableStorage.py", line 281, in checkPackWhileWriting self._PackWhileWriting(pack_now=False) File "/home/mg/src/new-zope-order/ZODB/src/ZODB/tests/PackableStorage.py", line 208, in _PackWhileWriting transaction.commit() File "/home/mg/.buildout/eggs/transaction-1.4.0-py3.3.egg/transaction/_manager.py", line 111, in commit return self.get().commit() File "/home/mg/.buildout/eggs/transaction-1.4.0-py3.3.egg/transaction/_transaction.py", line 286, in commit self._synchronizers.map(lambda s: s.afterCompletion(self)) File "/home/mg/.buildout/eggs/transaction-1.4.0-py3.3.egg/transaction/weakset.py", line 55, in map for wr in self.as_weakref_list(): RuntimeError: dictionary changed size during iteration
Showing
Please register or sign in to comment