[Checkins] SVN: relstorage/trunk/relstorage/storage.py ZODB 3.7 compatibility methods

Shane Hathaway shane at hathawaymix.org
Wed Oct 14 15:23:00 EDT 2009


Log message for revision 105069:
  ZODB 3.7 compatibility methods
  

Changed:
  U   relstorage/trunk/relstorage/storage.py

-=-
Modified: relstorage/trunk/relstorage/storage.py
===================================================================
--- relstorage/trunk/relstorage/storage.py	2009-10-14 18:26:29 UTC (rev 105068)
+++ relstorage/trunk/relstorage/storage.py	2009-10-14 19:23:00 UTC (rev 105069)
@@ -334,12 +334,28 @@
         """Return database size in bytes"""
         return self._adapter.stats.get_db_size()
 
-    def registerDB(self, db):
+    def registerDB(self, db, limit=None):
         pass # we don't care
 
     def isReadOnly(self):
         return self._is_read_only
 
+    def abortVersion(self, src, transaction):
+        # this method is only here for b/w compat with ZODB 3.7
+        if transaction is not self._transaction:
+            raise POSException.StorageTransactionError(self, transaction)
+        return self._tid, []
+
+    def commitVersion(self, src, dest, transaction):
+        # this method is only here for b/w compat with ZODB 3.7
+        if transaction is not self._transaction:
+            raise POSException.StorageTransactionError(self, transaction)
+        return self._tid, []
+
+    def getExtensionMethods(self):
+        # this method is only here for b/w compat with ZODB 3.7
+        return {}
+
     def _log_keyerror(self, oid_int, reason):
         """Log just before raising POSKeyError in load().
 
@@ -424,6 +440,8 @@
         state, serial = self.load(oid, '')
         return serial
 
+    getSerial = getTid  # ZODB 3.7
+
     def loadEx(self, oid, version):
         # Since we don't support versions, just tack the empty version
         # string onto load's result.



More information about the checkins mailing list