Commit ca859741 authored by Jim Fulton's avatar Jim Fulton

Added missing interface declarations to FileStorage.

Also removed the version argument from the FileStorage history method.
parent 43223f1e
...@@ -379,9 +379,16 @@ class FileStorageTests(FullGenericTests): ...@@ -379,9 +379,16 @@ class FileStorageTests(FullGenericTests):
self.failUnless(ZODB.interfaces.IStorageIteration.providedBy( self.failUnless(ZODB.interfaces.IStorageIteration.providedBy(
self._storage)) self._storage))
# This is communicated using ClientStorage's _info object: # This is communicated using ClientStorage's _info object:
self.assertEquals((('ZODB.interfaces', 'IStorageIteration'), self.assertEquals(
('zope.interface', 'Interface')), (('ZODB.interfaces', 'IStorageRestoreable'),
self._storage._info['interfaces']) ('ZODB.interfaces', 'IStorageIteration'),
('ZODB.interfaces', 'IStorageUndoable'),
('ZODB.interfaces', 'IStorageCurrentRecordIteration'),
('ZODB.interfaces', 'IStorage'),
('zope.interface', 'Interface'),
),
self._storage._info['interfaces']
)
class MappingStorageTests(GenericTests): class MappingStorageTests(GenericTests):
......
...@@ -90,7 +90,13 @@ class FileStorage(BaseStorage.BaseStorage, ...@@ -90,7 +90,13 @@ class FileStorage(BaseStorage.BaseStorage,
ConflictResolution.ConflictResolvingStorage, ConflictResolution.ConflictResolvingStorage,
FileStorageFormatter): 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. # Set True while a pack is in progress; undo is blocked for the duration.
_pack_is_in_progress = False _pack_is_in_progress = False
...@@ -933,8 +939,7 @@ class FileStorage(BaseStorage.BaseStorage, ...@@ -933,8 +939,7 @@ class FileStorage(BaseStorage.BaseStorage,
return tindex return tindex
def history(self, oid, version=None, size=1, filter=None): def history(self, oid, size=1, filter=None):
assert not version
self._lock_acquire() self._lock_acquire()
try: try:
r = [] r = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment