[ https://issues.apache.org/jira/browse/THRIFT-1797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539692#comment-13539692 ]
Roger Meier commented on THRIFT-1797: ------------------------------------- Thanks Avi! I committed this. Could you please have a look at this issue within cross language test suite? {noformat} $ cd test $ sh test.sh . Apache Thrift - integration test suite Wed Dec 26 21:59:07 CET 2012 ====================================================== client-server: protocol: transport: result: ... cpp-py binary buffered-ip failure =================== server message =================== Traceback (most recent call last): File "py/../../lib/py/build/lib.linux-x86_64-2.6/thrift/server/TServer.py", line 84, in serve self.processor.process(iprot, oprot) File "py/gen-py/ThriftTest/ThriftTest.py", line 1006, in process self._processMap[name](self, seqid, iprot, oprot) File "py/gen-py/ThriftTest/ThriftTest.py", line 1170, in process_testMapMap result.write(oprot) File "py/gen-py/ThriftTest/ThriftTest.py", line 3054, in write oprot.writeMapBegin(TType.I32, TType.MAP, len(self.success)) TypeError: object of type 'int' has no len() =================== client message =================== testMap({0 => -10, 1 => -9, 2 => -8, 3 => -7, 4 => -6}) = {0 => -10, 1 => -9, 2 => -8, 3 => -7, 4 => -6} testSet({-2, -1, 0, 1, 2}) = {-2, -1, 0, 1, 2} testList({-2, -1, 0, 1, 2}) = {-2, -1, 0, 1, 2} testEnum(ONE) = 1 testEnum(TWO) = 2 testEnum(THREE) = 3 testEnum(FIVE) = 5 testEnum(EIGHT) = 8 testTypedef(309858235082523) = 309858235082523 testMapMap(1)Aborted ====================================================== client-server: protocol: transport: result: cpp-py json buffered-ip failure =================== server message =================== Traceback (most recent call last): File "py/../../lib/py/build/lib.linux-x86_64-2.6/thrift/server/TServer.py", line 84, in serve self.processor.process(iprot, oprot) File "py/gen-py/ThriftTest/ThriftTest.py", line 1006, in process self._processMap[name](self, seqid, iprot, oprot) File "py/gen-py/ThriftTest/ThriftTest.py", line 1170, in process_testMapMap result.write(oprot) File "py/gen-py/ThriftTest/ThriftTest.py", line 3054, in write oprot.writeMapBegin(TType.I32, TType.MAP, len(self.success)) TypeError: object of type 'int' has no len() =================== client message =================== testMap({0 => -10, 1 => -9, 2 => -8, 3 => -7, 4 => -6}) = {0 => -10, 1 => -9, 2 => -8, 3 => -7, 4 => -6} testSet({-2, -1, 0, 1, 2}) = {-2, -1, 0, 1, 2} testList({-2, -1, 0, 1, 2}) = {-2, -1, 0, 1, 2} testEnum(ONE) = 1 testEnum(TWO) = 2 testEnum(THREE) = 3 testEnum(FIVE) = 5 testEnum(EIGHT) = 8 testTypedef(309858235082523) = 309858235082523 testMapMap(1)Aborted ====================================================== {noformat} > Python implementation of TSimpleJSONProtocol > --------------------------------------------- > > Key: THRIFT-1797 > URL: https://issues.apache.org/jira/browse/THRIFT-1797 > Project: Thrift > Issue Type: New Feature > Components: Python - Library > Affects Versions: 1.2 > Environment: Ubuntu > Reporter: Avi Flamholz > Attachments: python_simple_json_protocol.patch > > > I've attached a patch with a Python implementation of TSimpleJSONProtocol. > This protocol is write-only like the Java implementation. It also fixes a bug > in TJSONProtocol where the context stack was not being popped correctly. This > bug triggered a number of errors in the serialization and deserialization of > Thrift structures to JSON. > The patch also includes a test of TSimpleJSONProtocol. The test checks that > it returns sensible results, but does not check that the wire-format is > equivalent to the Java wire format. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira