[Zodb-checkins] CVS: ZODB3/BDBStorage - BerkeleyBase.py:1.41.16.3

Tim Peters tim.one at comcast.net
Fri Apr 22 15:36:37 EDT 2005


Update of /cvs-repository/ZODB3/BDBStorage
In directory cvs.zope.org:/tmp/cvs-serv20696/BDBStorage

Modified Files:
      Tag: Zope-2_7-branch
	BerkeleyBase.py 
Log Message:
DemoStorage:  Added implementations for registerDB() and new_oid().  As
Tres discovered the hard way, wrapping a ZEO client storage as a
DemoStorage base storage yields insane behavior otherwise.

BaseStorage.new_oid():  Rewrite to eliminate recursion, and hence also the
need for the undocumented and irregular `last=` argument.

Other:  removed the `last=` argument to new_oid() every place that felt
compelled to spread that insanity ;-).  Seriously, it served no purpose
at all elsewhere, and looks like people just cut 'n pasted in fear.


=== ZODB3/BDBStorage/BerkeleyBase.py 1.41.16.2 => 1.41.16.3 ===
--- ZODB3/BDBStorage/BerkeleyBase.py:1.41.16.2	Mon Sep 15 17:26:50 2003
+++ ZODB3/BDBStorage/BerkeleyBase.py	Fri Apr 22 15:36:07 2005
@@ -320,13 +320,9 @@
             self._len = len(self._serials)
         return self._len
 
-    def new_oid(self, last=None):
-        """Create a new object id.
-
-        If last is provided, the new oid will be one greater than that.
-        """
-        # BAW: the last parameter is undocumented in the UML model
-        newoid = BaseStorage.new_oid(self, last)
+    def new_oid(self):
+        """Create a new object id."""
+        newoid = BaseStorage.new_oid(self)
         if self._len is not None:
             # Increment the cached length
             self._len += 1



More information about the Zodb-checkins mailing list