[Zope3-checkins] CVS: Zope3/src/zodb/storage/file - main.py:1.6

Steve Alexander steve@cat-box.net
Fri, 6 Jun 2003 11:24:52 -0400


Update of /cvs-repository/Zope3/src/zodb/storage/file
In directory cvs.zope.org:/tmp/cvs-serv25930/src/zodb/storage/file

Modified Files:
	main.py 
Log Message:
Changed old style __implements__ declarations to new-style implements()
ones.


=== Zope3/src/zodb/storage/file/main.py 1.5 => 1.6 ===
--- Zope3/src/zodb/storage/file/main.py:1.5	Mon May 19 11:03:36 2003
+++ Zope3/src/zodb/storage/file/main.py	Fri Jun  6 11:24:21 2003
@@ -32,6 +32,8 @@
 except:
     fsync = None
 
+from zope.interface import implements
+
 from zodb.storage.base import BaseStorage, splitrefs
 from zodb import conflict
 from zodb.interfaces import *
@@ -45,8 +47,8 @@
 from zodb.storage.file.errors import *
 from zodb.storage.file.format \
      import FileStorageFormatter, DataHeader, TxnHeader
-from zodb.storage.file.format \
-     import TRANS_HDR, TRANS_HDR_LEN, DATA_HDR, DATA_HDR_LEN, DATA_VERSION_HDR_LEN
+from zodb.storage.file.format import TRANS_HDR, TRANS_HDR_LEN, DATA_HDR
+from zodb.storage.file.format import DATA_HDR_LEN, DATA_VERSION_HDR_LEN
 from zodb.storage.file.pack import FileStoragePacker
 
 logger = logging.getLogger("zodb.storage.file")
@@ -68,7 +70,7 @@
     # default pack time is 0
     _packt = ZERO
 
-    __implements__ = IStorage, IUndoStorage, IVersionStorage
+    implements(IStorage, IUndoStorage, IVersionStorage)
 
     def __init__(self, file_name, create=0, read_only=0, stop=None,
                  quota=None):
@@ -982,7 +984,7 @@
     _ltid = ZERO
     _file = None
 
-    __implements__ = IStorageIterator
+    implements(IStorageIterator)
 
     def __init__(self, filename, start=None, stop=None):
         self._file = open(filename, "rb")
@@ -1123,7 +1125,7 @@
 class RecordIterator(FileStorageFormatter):
     """Iterate over the transactions in a FileStorage file."""
 
-    __implements__ = ITransactionRecordIterator, ITransactionAttrs
+    implements(ITransactionRecordIterator, ITransactionAttrs)
 
     def __init__(self, tid, status, user, desc, ext, pos, tend, file, tpos):
         self.tid = tid
@@ -1173,7 +1175,7 @@
 class Record:
     """An abstract database record."""
 
-    __implements__ = IDataRecord
+    implements(IDataRecord)
 
     def __init__(self, oid, serial, version, data, data_txn, refs):
         self.oid = oid