• Marius Gedminas's avatar
    Fix occasional RuntimeErrors in transaction.weakset on Python 3 · b86f36bf
    Marius Gedminas authored
    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
    b86f36bf
To find the state of this project's repository at the time of any of these versions, check out the tags.
CHANGES.rst 4.36 KB