[Zope-Checkins] CVS: Zope3/lib/python/ZODB - Connection.py:1.60.6.5

Jeremy Hylton jeremy@zope.com
Tue, 5 Mar 2002 00:14:00 -0500


Update of /cvs-repository/Zope3/lib/python/ZODB
In directory cvs.zope.org:/tmp/cvs-serv5593

Modified Files:
      Tag: Zope-3x-branch
	Connection.py 
Log Message:
Remove unused global __new__.
Replace use of old-fashioned PickleCache with Cache.
Remove unused local version in commit().


=== Zope3/lib/python/ZODB/Connection.py 1.60.6.4 => 1.60.6.5 ===
 from Transaction import get_transaction
 
-__new__=object.__new__
-
 global_code_timestamp = 0
 
 def updateCodeTimestamp():
@@ -260,8 +258,7 @@
         self._code_timestamp = global_code_timestamp
         self._invalidated.clear()
         orig_cache = self._cache
-        self._cache = PickleCache(self, orig_cache.cache_size,
-                                  orig_cache.cache_age)
+        self._cache = Cache(orig_cache._size, orig_cache._inactive)
 
     def abort(self, object, transaction):
         """Abort the object in the transaction.
@@ -344,8 +341,6 @@
         pickler = Pickler(file, 1)
         pickler.persistent_id = new_persistent_id(self, stack)
 
-        version = self._version
-        
         while stack:
             self.commit_store(stack.pop(), file, pickler, transaction)