You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/01/06 12:45:40 UTC

[jira] [Commented] (THRIFT-3503) Enable py:utf8string by default

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

ASF GitHub Bot commented on THRIFT-3503:
----------------------------------------

GitHub user nsuke opened a pull request:

    https://github.com/apache/thrift/pull/779

    THRIFT-3503 Enable py:utf8string by default

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nsuke/thrift THRIFT-3503

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/779.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #779
    
----
commit b34ff7319373b87e10060d5cc35222d4933310c2
Author: Nobuaki Sukegawa <ns...@apache.org>
Date:   2016-01-06T05:52:50Z

    THRIFT-3525 py:dynamic fails to handle binary list/set/map element

commit 64929e532becd7e0f52b5af2630020663b74fd57
Author: Nobuaki Sukegawa <ns...@apache.org>
Date:   2016-01-06T05:45:19Z

    THRIFT-3526 Code generated by py:utf8strings does not work for Python3

commit be2f2a80daa75a07040773e11dd001a734e2a365
Author: Nobuaki Sukegawa <ns...@apache.org>
Date:   2016-01-06T05:43:15Z

    THRIFT-3527 -gen py:dynamic,utf8strings ignores utf8strings option

commit c2b52044e36050e1523689cee1885980a9c49667
Author: Nobuaki Sukegawa <ns...@apache.org>
Date:   2016-01-06T11:44:17Z

    THRIFT-3503 Enable py:utf8string by default

----


> Enable py:utf8string by default
> -------------------------------
>
>                 Key: THRIFT-3503
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3503
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Python - Compiler
>            Reporter: Aki Sukegawa
>            Assignee: Aki Sukegawa
>
> In python 2 and python 3, string and unicode is handled in very different ways.
> py3: {{str}} is unicode (no such type), it is not {{bytes}}.
> py2: {{str}} is not {{unicode}}, it is (aliased by) {{bytes}}.
> Because of this, while Thrift RPC API handles them as {{str}} for both cases, it is unicode for python3 users but {{bytes}} for python2 users.
> So a user who starts using Thrift + python2 is likely to write code that passes bytes to Thrift API.
> The code is broken when she/he wants to use the code with Thrift + python3.
> We should avoid this by changing this now before the first release of Thrift + Python3.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)