[Zodb-checkins] CVS: Zope3/src/zodb - connection.py:1.34 db.py:1.18
ztransaction.py:1.3
Steve Alexander
steve at cat-box.net
Fri Jun 6 12:24:50 EDT 2003
Update of /cvs-repository/Zope3/src/zodb
In directory cvs.zope.org:/tmp/cvs-serv25930/src/zodb
Modified Files:
connection.py db.py ztransaction.py
Log Message:
Changed old style __implements__ declarations to new-style implements()
ones.
=== Zope3/src/zodb/connection.py 1.33 => 1.34 ===
--- Zope3/src/zodb/connection.py:1.33 Tue May 20 15:07:24 2003
+++ Zope3/src/zodb/connection.py Fri Jun 6 11:24:19 2003
@@ -42,6 +42,8 @@
import tempfile
import threading
+from zope.interface import implements
+
from zodb import interfaces
from zodb.conflict import ResolvedSerial
from zodb.export import ExportImport
@@ -67,10 +69,10 @@
storage.
"""
- __implements__ = (IAppConnection, IConnection, IPersistentDataManager,
- IDataManager)
-
- def __init__(self, db, storage, version='', cache_size=400):
+ implements(IAppConnection, IConnection, IPersistentDataManager,
+ IDataManager)
+
+ def __init__(self, db, storage, version='', cache_size=400):
self._db = db
self._storage = storage
self._version = version
@@ -153,7 +155,7 @@
# We must explicitly deactivate it to turn it into a ghost.
obj._p_deactivate()
obj._p_serial = serial
-
+
self._cache.set(oid, obj)
if oid == ZERO:
# Keep a reference to the root so that the pickle cache
@@ -168,12 +170,12 @@
def setstate(self, obj):
oid = obj._p_oid
-
+
if not self._open:
msg = "Attempt to load object on closed connection: %r" % oid
self._log.warn(msg)
raise POSError(msg)
-
+
try:
# Avoid reading data from a transaction that committed
# after the current transaction started, as that might
@@ -294,7 +296,7 @@
######################################################################
# transaction.interfaces.IDataManager requires the next four methods
# prepare(), abort(), commit(), savepoint()
-
+
def prepare(self, txn):
if self._conflicts:
# XXX should raise all of the conflicting oids, but
@@ -532,7 +534,7 @@
# XXX Should it be possible to rollback() to the same savepoint
# more than once? (Yes.)
- __implements__ = IRollback
+ implements(IRollback)
def __init__(self, conn, tmp_undo):
self._conn = conn
=== Zope3/src/zodb/db.py 1.17 => 1.18 ===
--- Zope3/src/zodb/db.py:1.17 Tue May 20 15:07:24 2003
+++ Zope3/src/zodb/db.py Fri Jun 6 11:24:19 2003
@@ -23,6 +23,8 @@
from time import time
import logging
+from zope.interface import implements
+
from zodb.storage.interfaces import *
from zodb.connection import Connection
from zodb.serialize import getDBRoot
@@ -332,7 +334,7 @@
class SimpleDataManager:
- __implements__ = IDataManager
+ implements(IDataManager)
def __init__(self, db):
self._db = db
=== Zope3/src/zodb/ztransaction.py 1.2 => 1.3 ===
--- Zope3/src/zodb/ztransaction.py:1.2 Wed Dec 25 09:12:16 2002
+++ Zope3/src/zodb/ztransaction.py Fri Jun 6 11:24:19 2003
@@ -11,6 +11,9 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
+
+from zope.interface import implements
+
from transaction import set_factory
from transaction.txn import Transaction as BaseTransaction
@@ -18,7 +21,7 @@
class Transaction(BaseTransaction):
- __implements__ = ITransaction, ITransactionAttrs
+ implements(ITransaction, ITransactionAttrs)
user = ""
description = ""
More information about the Zodb-checkins
mailing list