THRIFT-3506 Eliminate old style classes from library code
Client: Python
Patch: Nobuaki Sukegawa
This closes #758
diff --git a/lib/py/src/protocol/TBinaryProtocol.py b/lib/py/src/protocol/TBinaryProtocol.py
index f92f558..43cb5a4 100644
--- a/lib/py/src/protocol/TBinaryProtocol.py
+++ b/lib/py/src/protocol/TBinaryProtocol.py
@@ -223,7 +223,7 @@
return s
-class TBinaryProtocolFactory:
+class TBinaryProtocolFactory(object):
def __init__(self, strictRead=False, strictWrite=True):
self.strictRead = strictRead
self.strictWrite = strictWrite
@@ -255,6 +255,6 @@
pass
-class TBinaryProtocolAcceleratedFactory:
+class TBinaryProtocolAcceleratedFactory(object):
def getProtocol(self, trans):
return TBinaryProtocolAccelerated(trans)
diff --git a/lib/py/src/protocol/TCompactProtocol.py b/lib/py/src/protocol/TCompactProtocol.py
index b8d171e..a8b025a 100644
--- a/lib/py/src/protocol/TCompactProtocol.py
+++ b/lib/py/src/protocol/TCompactProtocol.py
@@ -79,7 +79,7 @@
shift += 7
-class CompactType:
+class CompactType(object):
STOP = 0x00
TRUE = 0x01
FALSE = 0x02
@@ -399,7 +399,7 @@
return TTYPES[byte & 0x0f]
-class TCompactProtocolFactory:
+class TCompactProtocolFactory(object):
def __init__(self):
pass
diff --git a/lib/py/src/protocol/TJSONProtocol.py b/lib/py/src/protocol/TJSONProtocol.py
index 3539412..acfce4a 100644
--- a/lib/py/src/protocol/TJSONProtocol.py
+++ b/lib/py/src/protocol/TJSONProtocol.py
@@ -559,7 +559,7 @@
self.writeJSONBase64(binary)
-class TJSONProtocolFactory:
+class TJSONProtocolFactory(object):
def getProtocol(self, trans):
return TJSONProtocol(trans)
diff --git a/lib/py/src/protocol/TProtocol.py b/lib/py/src/protocol/TProtocol.py
index 1d703e3..be2fcea 100644
--- a/lib/py/src/protocol/TProtocol.py
+++ b/lib/py/src/protocol/TProtocol.py
@@ -39,7 +39,7 @@
self.type = type
-class TProtocolBase:
+class TProtocolBase(object):
"""Base class for Thrift protocol driver."""
def __init__(self, trans):
@@ -445,6 +445,6 @@
"i64 requires -9223372036854775808 <= number <= 9223372036854775807")
-class TProtocolFactory:
+class TProtocolFactory(object):
def getProtocol(self, trans):
pass