[
https://issues.apache.org/jira/browse/THRIFT-1494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498590#comment-13498590
]
Hudson commented on THRIFT-1494:
--------------------------------
Integrated in Thrift #583 (See [https://builds.apache.org/job/Thrift/583/])
THRIFT-1494 Python generated "Service-remote" script doesn't honor service
inheritance
Patch: Nathaniel Cook (Revision 1410130)
Result = SUCCESS
roger : http://svn.apache.org/viewvc/?view=rev&rev=1410130
Files :
* /thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc
> Python generated "Service-remote" script doesn't honor service inheritance
> --------------------------------------------------------------------------
>
> Key: THRIFT-1494
> URL: https://issues.apache.org/jira/browse/THRIFT-1494
> Project: Thrift
> Issue Type: Bug
> Components: Python - Compiler
> Affects Versions: 0.8
> Reporter: Nathaniel Cook
> Assignee: Nathaniel Cook
> Labels: inheritance, python, service
> Attachments: THRIFT-1494.patch
>
>
> The python compiler generates a nice "Service-remove" script for making
> requests to the server.
> The script doesn't include any methods from inherited services.
> Example:
> {code}
> service Base {
> i32 getStatus()
> }
> service Derived extends Base {
> string doWork()
> }
> {code}
> Excerpt from generated Base-remote
> {code}
> print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]]
> function [arg1 [arg2...]]'
> print ''
> print 'Functions:'
> print ' i32 getStatus()'
> print ''
> {code}
> Excerpt from generated Derived-remote
> {code}
> print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]]
> function [arg1 [arg2...]]'
> print ''
> print 'Functions:'
> print ' string doWork()'
> print ''
> {code}
> Here we can see that Derived doesn't have a method defined for getStatus.
> These excerpts show just the usage statement but the implementation for
> getStatus doesn't exists either.
> Also on a different note the remote script depends on the Service.py script
> to be in the same directory. It would be nice if the import where absolute so
> that the script could be executed from any directory.
--
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