Revert "THRIFT-4002: Make generated exception classes immutable by default"
This reverts commit b40f5c227f8db61be523f23ca017519167589d97.
diff --git a/lib/py/src/protocol/TBase.py b/lib/py/src/protocol/TBase.py
index 6c6ef18..9ae1b11 100644
--- a/lib/py/src/protocol/TBase.py
+++ b/lib/py/src/protocol/TBase.py
@@ -80,7 +80,3 @@
[self.__class__, self.thrift_spec])
else:
return iprot.readStruct(cls, cls.thrift_spec, True)
-
-
-class TFrozenExceptionBase(TFrozenBase, TExceptionBase):
- pass
diff --git a/lib/py/src/protocol/TProtocol.py b/lib/py/src/protocol/TProtocol.py
index 339a283..3456e8f 100644
--- a/lib/py/src/protocol/TProtocol.py
+++ b/lib/py/src/protocol/TProtocol.py
@@ -303,14 +303,8 @@
def readContainerStruct(self, spec):
(obj_class, obj_spec) = spec
-
- # If obj_class.read is a classmethod (e.g. in frozen structs),
- # call it as such.
- if getattr(obj_class.read, '__self__', None) is obj_class:
- obj = obj_class.read(self)
- else:
- obj = obj_class()
- obj.read(self)
+ obj = obj_class()
+ obj.read(self)
return obj
def readContainerMap(self, spec):