[ 
https://issues.apache.org/jira/browse/THRIFT-1797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Avi Flamholz updated THRIFT-1797:
---------------------------------

    Attachment: fix_python_test_server.patch

I am attaching a patch with a partial fix. It does not look to me like my 
recent patch caused the failures in test.sh. Rather, it seems like 
TestServer.py was way out of sync with the C++ client and, in some places, 
simply returning values of the wrong types.

I fixed all the problems of this sort that I found. However, there seems to be 
a bigger issue here. 

In ThriftTest.thrift, it says that implementation of the service should raise 
TException when the input to testException equals "TException". However, the 
generated Python code only forwards exceptions to clients if they are of the 
types declared in the service definition. If you raise an exception of another 
type, the server simply does not respond. This strikes me as a bug (at the very 
least, it is different from the behavior on C++), but it is much deeper than 
the Python TSimpleJSONProtocol. If you all agree, I will file a separate bug 
for this problem.

Avi
                
> 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: fix_python_test_server.patch, 
> 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

Reply via email to