[Zope3-checkins] CVS: ZODB/src/ZODB - Connection.py:1.134

Jeremy Hylton jeremy at zope.com
Thu Mar 4 11:15:56 EST 2004


Update of /cvs-repository/ZODB/src/ZODB
In directory cvs.zope.org:/tmp/cvs-serv23784/src/ZODB

Modified Files:
	Connection.py 
Log Message:
Only pass argument to full_sweep() when one is passed by caller.
Add a few comments.


=== ZODB/src/ZODB/Connection.py 1.133 => 1.134 ===
--- ZODB/src/ZODB/Connection.py:1.133	Tue Mar  2 11:25:07 2004
+++ ZODB/src/ZODB/Connection.py	Thu Mar  4 11:15:55 2004
@@ -194,6 +194,10 @@
 
     def setLocalTransaction(self):
         """Use a transaction bound to the connection rather than the thread"""
+
+        # XXX mention that this should only be called when you open
+        # a connection or at transaction boundaries (but the lattter are
+        # hard to be sure about).
         if self._transaction is None:
             self._transaction = Transaction()
         return self._transaction
@@ -371,11 +375,14 @@
     # XXX we should test what happens when these methods are called
     # mid-transaction.
 
-    def cacheFullSweep(self, dt=0):
+    def cacheFullSweep(self, dt=None):
         # XXX needs doc string
         warnings.warn("cacheFullSweep is deprecated. "
                       "Use cacheMinimize instead.", DeprecationWarning)
-        self._cache.full_sweep(dt)
+        if dt is None:
+            self._cache.full_sweep()
+        else:
+            self._cache.full_sweep(dt)
 
     def cacheMinimize(self, dt=None):
         """Deactivate all unmodified objects in the cache.




More information about the Zope3-Checkins mailing list