[ZODB-Dev] Invalidations

Gary Poster gary at zope.com
Thu May 5 23:24:11 EDT 2005


On May 5, 2005, at 8:40 PM, Tim Peters wrote:

> ...I'd
> be happier not finishing this exercise <0.5 wink>, so TM.begin() it  
> is.

I'm guessing this thread has to do with the recent _synch changes in  
transaction._manager.py.  I can't get Zope 3 to run without the  
following change to the HEAD (which seems right enough, but this is  
just on the basis of a quick look).  Is this right?

Gary

Index: transaction/_manager.py
===================================================================
--- transaction/_manager.py     (revision 30261)
+++ transaction/_manager.py     (working copy)
@@ -101,6 +101,9 @@
          if txn is not None:
              txn.abort()
          synchs = self._synchs.get(tid)
+        if synchs is None:
+            from ZODB.utils import WeakSet
+            synchs = self._synchs[tid] = WeakSet()
          txn = self._txns[tid] = Transaction(synchs, self)
          _new_transaction(txn, synchs)
          return txn





More information about the ZODB-Dev mailing list