[
https://issues.apache.org/jira/browse/THRIFT-335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexander Shigin updated THRIFT-335:
------------------------------------
Priority: Major (was: Trivial)
Fix Version/s: 0.2
We have to do something with current implementaion of protocol usage in
generated code.
I've made pure python deserialization:
http://github.com/shigin/thrift/blob/6a6e787c2f2e16cf7be0fde13235ba685d789e56/lib/py/src/Struct.py
The realization is a bit out-dated (june 2008), but I plan to update one in a
couple of days.
So new generated code would be like:
{code}
class Bonk:
.........
def read(self, iprot):
iprot.read(self, Bonk)
class TBinaryProtocol:
...........
def fastread(self, obj, class_):
fastbinary.decode_binary(obj, self.trans, (class_, class_.thrift_spec))
def defaultread(self, obj, class_):
# we code from ThriftStruct.read
try:
import fastbinary
TBinaryProtocol.read = TBinaryProtocol.fastread
TBinaryProtocol.write = TBinaryProtocol.fastwrite
except ImportError:
TBinaryProtocol.read = TBinaryProtocol.defaultread
TBinaryProtocol.write = TBinaryProtocol.defaultwrite
{code}
> Compact Protocol for Python
> ---------------------------
>
> Key: THRIFT-335
> URL: https://issues.apache.org/jira/browse/THRIFT-335
> Project: Thrift
> Issue Type: Sub-task
> Components: Library (Python)
> Reporter: Bryan Duxbury
> Fix For: 0.2
>
> Attachments: thrift-compact-python-v1.patch
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.