thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger Meier (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (THRIFT-1494) Python generated "Service-remote" script doesn't honor service inheritance
Date Fri, 16 Nov 2012 00:53:11 GMT

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

Roger Meier resolved THRIFT-1494.
---------------------------------

    Resolution: Fixed

thanks Nathaniel
                
> 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

Mime
View raw message