Commit a5ffd19d authored by Julien Muchembled's avatar Julien Muchembled

client: use @implementer instead of deprecated implements() when declaring interfaces

parent e57ef6cc
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from ZODB import BaseStorage, ConflictResolution, POSException from ZODB import BaseStorage, ConflictResolution, POSException
from zope.interface import implements from zope.interface import implementer
import ZODB.interfaces import ZODB.interfaces
from functools import wraps from functools import wraps
...@@ -26,11 +26,7 @@ from .exception import NEOStorageNotFoundError, NEOStorageDoesNotExistError ...@@ -26,11 +26,7 @@ from .exception import NEOStorageNotFoundError, NEOStorageDoesNotExistError
def raiseReadOnlyError(*args, **kw): def raiseReadOnlyError(*args, **kw):
raise POSException.ReadOnlyError() raise POSException.ReadOnlyError()
class Storage(BaseStorage.BaseStorage, @implementer(
ConflictResolution.ConflictResolvingStorage):
"""Wrapper class for neoclient."""
implements(
ZODB.interfaces.IStorage, ZODB.interfaces.IStorage,
# ZODB.interfaces.IStorageRestoreable, # ZODB.interfaces.IStorageRestoreable,
ZODB.interfaces.IStorageIteration, ZODB.interfaces.IStorageIteration,
...@@ -38,6 +34,9 @@ class Storage(BaseStorage.BaseStorage, ...@@ -38,6 +34,9 @@ class Storage(BaseStorage.BaseStorage,
ZODB.interfaces.IExternalGC, ZODB.interfaces.IExternalGC,
ZODB.interfaces.ReadVerifyingStorage, ZODB.interfaces.ReadVerifyingStorage,
) )
class Storage(BaseStorage.BaseStorage,
ConflictResolution.ConflictResolvingStorage):
"""Wrapper class for neoclient."""
def __init__(self, master_nodes, name, read_only=False, def __init__(self, master_nodes, name, read_only=False,
compress=None, logfile=None, _app=None, **kw): compress=None, logfile=None, _app=None, **kw):
......
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