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