Commit 501a0896 authored by Steve Alexander's avatar Steve Alexander

Changed old style __implements__ declarations to new-style implements()

ones.
parent ef835347
......@@ -14,6 +14,8 @@
import logging
import sys
from zope.interface import implements
from transaction.interfaces import *
from transaction.txn import Transaction, Status, Set
......@@ -81,7 +83,7 @@ class AbstractTransactionManager(object):
class TransactionManager(AbstractTransactionManager):
__implements__ = ITransactionManager
implements(ITransactionManager)
def __init__(self):
self.logger = logging.getLogger("txn")
......@@ -124,7 +126,7 @@ class TransactionManager(AbstractTransactionManager):
class Rollback(object):
__implements__ = IRollback
implements(IRollback)
def __init__(self, txn, resources):
self._txn = txn
......@@ -151,7 +153,7 @@ class ThreadedTransactionManager(AbstractTransactionManager):
# does need a lock to prevent two different threads from resuming
# the same transaction.
__implements__ = ITransactionManager
implements(ITransactionManager)
def __init__(self):
self.logger = logging.getLogger("txn")
......
......@@ -17,6 +17,7 @@ __metaclass__ = type
from transaction.interfaces import *
from threading import Lock
import logging
from zope.interface import implements
try:
from sets import Set
......@@ -43,7 +44,7 @@ class Status:
class Transaction:
__implements__ = ITransaction
implements(ITransaction)
def __init__(self, manager=None, parent=None):
self._manager = manager
......
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