[Zope3-checkins] CVS: Zope3/src/transaction - _transaction.py:1.1.2.29

Jeremy Hylton jeremy at zope.com
Mon Mar 29 23:32:57 EST 2004


Update of /cvs-repository/Zope3/src/transaction
In directory cvs.zope.org:/tmp/cvs-serv29897

Modified Files:
      Tag: jeremy-txn-branch
	_transaction.py 
Log Message:
Make expensive assert even more expensive.


=== Zope3/src/transaction/_transaction.py 1.1.2.28 => 1.1.2.29 ===
--- Zope3/src/transaction/_transaction.py:1.1.2.28	Mon Mar 29 13:47:49 2004
+++ Zope3/src/transaction/_transaction.py	Mon Mar 29 23:32:56 2004
@@ -167,7 +167,8 @@
             self.join(adapter)
         else:
             # XXX comment out this expensive assert later
-            assert obj not in adapter.objects
+            # Use id() to guard against proxies.
+            assert id(obj) not in map(id, adapter.objects)
             adapter.objects.append(obj)
 
             # In the presence of subtransactions, an existing adapter




More information about the Zope3-Checkins mailing list