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

Chamikara Jayalath commented on BEAM-1373:
------------------------------------------

I haven't tried use_2to3 but I think we'll run into issues if we try to use 
such automatic conversion.

For example, there are places in code currently where we use string literals 
for storing bytes. We will run into issues since Python3 will start considering 
such strings to be unicode. Hence we have to carefully update codebase to mark 
strings as bytes/unicode properly.

I think porting code to work for both Python 2 and 3 and carefully fixing all 
tests is a safer approach. As a bonus that will also give us a code base 
written using Python 3 syntax instead of having to maintain Python 2 syntax.

Just my 2 cents. WDYT ?


> Update Python SDK code to support both Python 2 and 3
> -----------------------------------------------------
>
>                 Key: BEAM-1373
>                 URL: https://issues.apache.org/jira/browse/BEAM-1373
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py
>            Reporter: Chamikara Jayalath
>            Assignee: Chamikara Jayalath
>
> This can be performed by following standard Py2 -> Py2/3 conversion process 
> defined in the following document.
> http://python-future.org/automatic_conversion.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to