[ 
https://issues.apache.org/jira/browse/THRIFT-339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12683659#action_12683659
 ] 

David Reiss commented on THRIFT-339:
------------------------------------

Esteve: Good call on 3 vs. -2.

Don't we also need to adjust type_to_spec_args in order to include the limits 
for nested structures?

Also, it is unfortunate that adding the limits broke compatibility with the old 
version of the extension module.  It doesn't seem like it will be easy to 
maintain compatibility, so as long as we are breaking it, we might as well go 
wild.  If you want to combine the field specifiers and limits into a single 
attribute, that would be okay.

> THRIFT-242 is incompatible with arguments with empty key fields
> ---------------------------------------------------------------
>
>                 Key: THRIFT-339
>                 URL: https://issues.apache.org/jira/browse/THRIFT-339
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Python)
>            Reporter: Jonathan Ellis
>         Attachments: thrift-339-2.patch, thrift-339-3.patch, 
> thrift-339-4.patch, thrift-339-5.patch, thrift-339-6.patch, thrift-339.patch, 
> thrift-python-defaults-v2.patch, thrift-python-defaults.patch
>
>
> Esteve's last change to how default values are stored broke stuff.  Here is a 
> quick example:
> {{
> service Test
> {
>   bool  get_slice(i32 start = -1),
> }
> }}
> generates
> {{
> class get_slice_args:
>   thrift_spec = None
>   def __init__(self, start=thrift_spec[-1][4],):
>     self.start = start
> }}
> which is obviously invalid.
> I'm not sure how thrift_spec is supposed to be populated here so I'm unsure 
> how to fix this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to