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

ASF subversion and git services commented on IMPALA-11951:
----------------------------------------------------------

Commit ff62a4df3927ad054d5374e922c8399c2a227182 in impala's branch 
refs/heads/master from Joe McDonnell
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=ff62a4df3 ]

IMPALA-11951: Add tools for checking/fixing python 3 syntax

This adds the bin/check-python-syntax.sh script, which
runs "python -m compileall" for all python files in
Impala with both python2 and python3. This detects
syntax errors in the python files. This will be
incorporated into precommit once it is clean.

This also adds future to the impala-python virtualenv.
This provides the futurize script (exposed via
impala-futurize), which can be used to automatically
fix some py2/py3 issues. Future also provides the
builtins library, which can provide python 3
functionality on python 2.

Testing:
 - Ran impala-futurize locally
 - Ran the script repeatedly while fixing syntax errors

Change-Id: Iae2c51bc6ddc9b6a04469ee1b8284227fed3bd45
Reviewed-on: http://gerrit.cloudera.org:8080/19550
Reviewed-by: Michael Smith <michael.sm...@cloudera.com>
Tested-by: Michael Smith <michael.sm...@cloudera.com>


> Add a script that compiles the python code with Python 2 and Python 3
> ---------------------------------------------------------------------
>
>                 Key: IMPALA-11951
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11951
>             Project: IMPALA
>          Issue Type: Sub-task
>          Components: Infrastructure
>    Affects Versions: Impala 4.3.0
>            Reporter: Joe McDonnell
>            Assignee: Joe McDonnell
>            Priority: Major
>
> One prerequisite for using Python 3 is fixing all syntax errors across all 
> our Python code. We should add a script that compiles every python files with 
> Python 2 and Python 3 to verify that the syntax is ok. Once clean, this 
> should run as part of GVO.
> For example, Python has a compileall functionality that can be used:
> {noformat}
> python3 -m compileall {python file}{noformat}
> This is also a good time to add future as a pypi dependency (provides the 
> futurize script and some libraries for writing py2/py3 code).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to