GitHub user cclauss opened a pull request:

    https://github.com/apache/spark/pull/20838

    [SPARK-23698] Resolve undefined names in Python 3

    ## What changes were proposed in this pull request?
    
    Fix issues arising from the fact that __file__, __long__, __raw_input()__, 
__unicode__, __xrange()__, etc. were remove from Python 3.  __Undefined names__ 
have the potential to raise NameError at runtime.  Apply the Python porting 
best practice: [Use feature detection instead of version 
detection](https://docs.python.org/3/howto/pyporting.html#use-feature-detection-instead-of-version-detection).
  
    
    ## How was this patch tested?
    * $ __python2 -m flake8 . --count --select=E9,F82 --show-source 
--statistics__
    * $ __python3 -m flake8 . --count --select=E9,F82 --show-source 
--statistics__
    
    Please review http://spark.apache.org/contributing.html before opening a 
pull request.


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

    $ git pull https://github.com/cclauss/spark fix-undefined-names

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

    https://github.com/apache/spark/pull/20838.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 #20838
    
----
commit bdcd740a5144efef0db1f2b6c29b64c85f3d8ef5
Author: cclauss <cclauss@...>
Date:   2018-03-15T23:08:04Z

    [SPARK-23698] Reduce undefined names in Python 3

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to