[Zope3-checkins] CVS: Zope3/src/zodb/storage - base.py:1.29.2.1 bdbfull.py:1.24.14.1 bdbminimal.py:1.18.14.1 demo.py:1.10.10.1 mapping.py:1.9.10.1
Grégoire Weber
zope@i-con.ch
Sun, 22 Jun 2003 10:23:59 -0400
Update of /cvs-repository/Zope3/src/zodb/storage
In directory cvs.zope.org:/tmp/cvs-serv24874/src/zodb/storage
Modified Files:
Tag: cw-mail-branch
base.py bdbfull.py bdbminimal.py demo.py mapping.py
Log Message:
Synced up with HEAD
=== Zope3/src/zodb/storage/base.py 1.29 => 1.29.2.1 ===
--- Zope3/src/zodb/storage/base.py:1.29 Thu May 15 16:59:03 2003
+++ Zope3/src/zodb/storage/base.py Sun Jun 22 10:22:28 2003
@@ -36,7 +36,7 @@
berkeley_is_available = True
except ImportError:
berkeley_is_available = False
- # But, DemoStorage piggybacks on the implementation of BDBFullStorage so
+ # But, MemoryStorage piggybacks on the implementation of BDBFullStorage so
# create a fake db object that has some useful constants.
class db:
DB_QUEUE = 1
@@ -46,7 +46,6 @@
class DBNotFoundError(Exception): pass
class DBKeyEmpty(Exception): pass
-
from zodb.conflict import ConflictResolver
from zodb.timestamp import newTimeStamp, TimeStamp
from zodb.interfaces import ITransactionAttrs, ZERO
@@ -302,7 +301,7 @@
filter = None
return self.undoLog(first, last, filter)
- def undoLog(self, first, last, filter=None):
+ def undoLog(self, first=0, last=-20, filter=None):
return ()
def versionEmpty(self, version):
=== Zope3/src/zodb/storage/bdbfull.py 1.24 => 1.24.14.1 ===
--- Zope3/src/zodb/storage/bdbfull.py:1.24 Tue Apr 22 11:23:13 2003
+++ Zope3/src/zodb/storage/bdbfull.py Sun Jun 22 10:22:28 2003
@@ -20,6 +20,7 @@
import time
import cPickle as pickle
from struct import pack, unpack
+from zope.interface import implements
from zodb.interfaces import *
from zodb.storage.interfaces import *
@@ -49,9 +50,9 @@
class BDBFullStorage(BerkeleyBase):
-
- __implements__ = IStorage, IUndoStorage, IVersionStorage
-
+
+ implements(IStorage, IUndoStorage, IVersionStorage)
+
def _init(self):
# Data Type Assumptions:
#
@@ -1754,7 +1755,7 @@
Transactions *must* be accessed sequentially (e.g. with a for loop).
"""
- __implements__ = IStorageIterator
+ implements(IStorageIterator)
def __init__(self, storage, start, stop):
self._storage = storage
@@ -1799,7 +1800,7 @@
Items *must* be accessed sequentially (e.g. with a for loop).
"""
- __implements__ = ITransactionAttrs, ITransactionRecordIterator
+ implements(ITransactionAttrs, ITransactionRecordIterator)
# Transaction id as an 8-byte timestamp string
tid = None
@@ -1877,7 +1878,7 @@
class _Record:
- __implements__ = IDataRecord
+ implements(IDataRecord)
# Object Id
oid = None
=== Zope3/src/zodb/storage/bdbminimal.py 1.18 => 1.18.14.1 ===
--- Zope3/src/zodb/storage/bdbminimal.py:1.18 Tue Apr 22 11:23:13 2003
+++ Zope3/src/zodb/storage/bdbminimal.py Sun Jun 22 10:22:28 2003
@@ -17,6 +17,8 @@
$Id$
"""
+from zope.interface import implements
+
from zodb.interfaces import ZERO
from zodb.storage.interfaces import *
from zodb.utils import p64, u64
@@ -37,8 +39,8 @@
class BDBMinimalStorage(BerkeleyBase):
- __implements__ = IStorage
-
+ implements(IStorage)
+
def _init(self):
# Data Type Assumptions:
#
=== Zope3/src/zodb/storage/demo.py 1.10 => 1.10.10.1 ===
--- Zope3/src/zodb/storage/demo.py:1.10 Thu May 1 15:35:00 2003
+++ Zope3/src/zodb/storage/demo.py Sun Jun 22 10:22:28 2003
@@ -27,6 +27,8 @@
$Id$
"""
+from zope.interface import implements
+
from zodb.interfaces import VersionLockError
from zodb.storage.memory import MemoryFullStorage
from zodb.storage.interfaces import *
@@ -41,7 +43,7 @@
when the DemoStorage object is closed.
"""
- __implements__ = IStorage, IUndoStorage, IVersionStorage
+ implements(IStorage, IUndoStorage, IVersionStorage)
def __init__(self, name, backstorage, config=None):
self._back = backstorage
=== Zope3/src/zodb/storage/mapping.py 1.9 => 1.9.10.1 ===
--- Zope3/src/zodb/storage/mapping.py:1.9 Thu May 1 15:35:00 2003
+++ Zope3/src/zodb/storage/mapping.py Sun Jun 22 10:22:28 2003
@@ -28,10 +28,11 @@
from zodb.storage.base import BaseStorage
from zodb.storage.interfaces import *
from zodb.timestamp import TimeStamp
+from zope.interface import implements
class MappingStorage(BaseStorage):
- __implements__ = IStorage
+ implements(IStorage)
def __init__(self, name="Mapping Storage"):
BaseStorage.__init__(self, name)