[Zodb-checkins] SVN: ZODB/trunk/src/Z Added missing interface declarations to FileStorage.

Jim Fulton jim at zope.com
Sat Oct 18 13:34:30 EDT 2008


Log message for revision 92362:
  Added missing interface declarations to FileStorage.
  
  Also removed the version argument from the FileStorage history method.
  

Changed:
  U   ZODB/trunk/src/ZEO/tests/testZEO.py
  U   ZODB/trunk/src/ZODB/FileStorage/FileStorage.py

-=-
Modified: ZODB/trunk/src/ZEO/tests/testZEO.py
===================================================================
--- ZODB/trunk/src/ZEO/tests/testZEO.py	2008-10-18 17:34:26 UTC (rev 92361)
+++ ZODB/trunk/src/ZEO/tests/testZEO.py	2008-10-18 17:34:29 UTC (rev 92362)
@@ -379,9 +379,16 @@
         self.failUnless(ZODB.interfaces.IStorageIteration.providedBy(
             self._storage))
         # This is communicated using ClientStorage's _info object:
-        self.assertEquals((('ZODB.interfaces', 'IStorageIteration'),
-                           ('zope.interface', 'Interface')),
-                          self._storage._info['interfaces'])
+        self.assertEquals(
+            (('ZODB.interfaces', 'IStorageRestoreable'),
+             ('ZODB.interfaces', 'IStorageIteration'),
+             ('ZODB.interfaces', 'IStorageUndoable'),
+             ('ZODB.interfaces', 'IStorageCurrentRecordIteration'),
+             ('ZODB.interfaces', 'IStorage'),
+             ('zope.interface', 'Interface'),
+             ),
+            self._storage._info['interfaces']
+            )
 
 
 class MappingStorageTests(GenericTests):

Modified: ZODB/trunk/src/ZODB/FileStorage/FileStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/FileStorage/FileStorage.py	2008-10-18 17:34:26 UTC (rev 92361)
+++ ZODB/trunk/src/ZODB/FileStorage/FileStorage.py	2008-10-18 17:34:29 UTC (rev 92362)
@@ -90,7 +90,13 @@
                   ConflictResolution.ConflictResolvingStorage,
                   FileStorageFormatter):
 
-    zope.interface.implements(ZODB.interfaces.IStorageIteration)
+    zope.interface.implements(
+        ZODB.interfaces.IStorage,
+        ZODB.interfaces.IStorageRestoreable,
+        ZODB.interfaces.IStorageIteration,
+        ZODB.interfaces.IStorageUndoable,
+        ZODB.interfaces.IStorageCurrentRecordIteration,
+        )
 
     # Set True while a pack is in progress; undo is blocked for the duration.
     _pack_is_in_progress = False
@@ -933,8 +939,7 @@
 
         return tindex
 
-    def history(self, oid, version=None, size=1, filter=None):
-        assert not version
+    def history(self, oid, size=1, filter=None):
         self._lock_acquire()
         try:
             r = []



More information about the Zodb-checkins mailing list