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

Jonathan Ellis commented on THRIFT-395:
---------------------------------------

> If your api method takes an integer, but in your application the only valid 
> values are even numbers, should we include that validation in Thrift as well?

Kevin: that's an excellent analogy.

If some languages defined an `even` type, should we expose that to thrift?  I 
am arguing that there are two consistent alternatives:

 - expose an `even` type and make thrift responsible for raising an error if a 
client passes a non-even int (in languages where this is possible)
 - don't expose `even` at all and make everyone use int so it's explicit what 
the expectations are

what we have now is, in effect, everyone using the closest "native" type they 
have to `even` which is in some cases not necessarily even at all, which leads 
to strange errors when sending one of those to a language that _does_ have 
native `even`s.

> Python library + compiler does not support unicode strings
> ----------------------------------------------------------
>
>                 Key: THRIFT-395
>                 URL: https://issues.apache.org/jira/browse/THRIFT-395
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Python), Library (Python)
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>             Fix For: 0.1
>
>         Attachments: 
> 0001-python-Minor-cleanup-of-protocols-don-t-use-str.patch, 
> 0002-THRIFT-395.-python-Phase-One-of-support-for-unicode.patch, 
> 0003-THRIFT-395.-python-Phase-Two-of-support-for-unicode.patch, 
> 0004-python-Remove-ridiculous-semicolons-from-gen-code.patch, 
> python-utf8-v2.patch, python-utf8.patch
>
>
> Effectively, all strings in the python bindings are treated as binary strings 
> -- no encoding/decoding to UTF-8 is done.  So if a unicode object is passed 
> to a (regular, non-binary) string, an exception is raised.

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