THRIFT-4009 Use @implementer instead of implements in TTwisted.py
Client: Python
Patch: ciarancourtney <ciaran.courtney@cylon.com>
This closes #1142
diff --git a/lib/py/src/transport/TTwisted.py b/lib/py/src/transport/TTwisted.py
index 5710b57..a27f0ad 100644
--- a/lib/py/src/transport/TTwisted.py
+++ b/lib/py/src/transport/TTwisted.py
@@ -20,7 +20,7 @@
from io import BytesIO
import struct
-from zope.interface import implements, Interface, Attribute
+from zope.interface import implementer, Interface, Attribute
from twisted.internet.protocol import ServerFactory, ClientFactory, \
connectionDone
from twisted.internet import defer
@@ -257,10 +257,9 @@
oprot_factory = Attribute("Output protocol factory")
+@implementer(IThriftServerFactory)
class ThriftServerFactory(ServerFactory):
- implements(IThriftServerFactory)
-
protocol = ThriftServerProtocol
def __init__(self, processor, iprot_factory, oprot_factory=None):
@@ -272,10 +271,9 @@
self.oprot_factory = oprot_factory
+@implementer(IThriftClientFactory)
class ThriftClientFactory(ClientFactory):
- implements(IThriftClientFactory)
-
protocol = ThriftClientProtocol
def __init__(self, client_class, iprot_factory, oprot_factory=None):