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

ASF GitHub Bot commented on BEAM-1368:
--------------------------------------

GitHub user wikier opened a pull request:

    https://github.com/apache/beam/pull/1887

    [BEAM-1368] fixed setup should be portable to Python 3.x

    By replacing the usage of `execfile()` by `exec()`, which is the official 
recommendation for portability.
    
    Further details described at 
[BEAM-1368](https://issues.apache.org/jira/browse/BEAM-1368).
    
    ---
    
    Be sure to do all of the following to help us incorporate your contribution
    quickly and easily:
    
     - [X] Make sure the PR title is formatted like:
       `[BEAM-<Jira issue #>] Description of pull request`
     - [X] Make sure tests pass via `mvn clean verify`. (Even better, enable
           Travis-CI on your fork and ensure the whole test matrix passes).
     - [X] Replace `<Jira issue #>` in the title with the actual Jira issue
           number, if there is one.
     - [X] If this contribution is large, please file an Apache
           [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.txt).
    
    


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

    $ git pull https://github.com/wikier/beam BEAM-1368_setup_python3

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

    https://github.com/apache/beam/pull/1887.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 #1887
    
----
commit 5253bcb1ff46b93c0d27ada81e40f556bcc627c1
Author: Sergio Fernández <[email protected]>
Date:   2017-02-01T08:20:51Z

    BEAM-1368: replaced usage of execfile() by exec(), which is the official 
recommendation for portability

----


> Python setup should be portable to Python 3.x
> ---------------------------------------------
>
>                 Key: BEAM-1368
>                 URL: https://issues.apache.org/jira/browse/BEAM-1368
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py
>            Reporter: Sergio Fernández
>            Assignee: Ahmet Altay
>            Priority: Trivial
>             Fix For: 0.6.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> As [~balduncle] reported at BEAM-1251:
> {quote}
> I ran into the following right away with Python 3.6.0, for example, and would 
> like to report issues in an appropriate manner since I imagine I'll run into 
> more.
> {quote}
> {code:none}
> $ python setup.py sdist
> Traceback (most recent call last):
>   File "setup.py", line 38, in <module>
>     PACKAGE_VERSION = get_version()
>   File "setup.py", line 33, in get_version
>     execfile(os.path.normpath('./apache_beam/version.py'),
> NameError: name 'execfile' is not defined
> {code}
> This issues doesn't aim to make the SDK runtime compatible with Python 3.x, 
> just trying to fix the library setup. That's another story that will be 
> discussed at BEAM-1251.



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

Reply via email to