Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-23698

Spark code contains numerous undefined names in Python 3

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.4.0
    • Component/s: PySpark
    • Labels:
      None
    • Target Version/s:

      Description

      flake8 testing of https://github.com/apache/spark on Python 3.6.3

      $ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

      ./dev/merge_spark_pr.py:98:14: F821 undefined name 'raw_input'
      result = raw_input("\n%s (y/n): " % prompt)
      ^
      ./dev/merge_spark_pr.py:136:22: F821 undefined name 'raw_input'
      primary_author = raw_input(
      ^
      ./dev/merge_spark_pr.py:186:16: F821 undefined name 'raw_input'
      pick_ref = raw_input("Enter a branch name [%s]: " % default_branch)
      ^
      ./dev/merge_spark_pr.py:233:15: F821 undefined name 'raw_input'
      jira_id = raw_input("Enter a JIRA id [%s]: " % default_jira_id)
      ^
      ./dev/merge_spark_pr.py:278:20: F821 undefined name 'raw_input'
      fix_versions = raw_input("Enter comma-separated fix version(s) [%s]: " % default_fix_versions)
      ^
      ./dev/merge_spark_pr.py:317:28: F821 undefined name 'raw_input'
      raw_assignee = raw_input(
      ^
      ./dev/merge_spark_pr.py:430:14: F821 undefined name 'raw_input'
      pr_num = raw_input("Which pull request would you like to merge? (e.g. 34): ")
      ^
      ./dev/merge_spark_pr.py:442:18: F821 undefined name 'raw_input'
      result = raw_input("Would you like to use the modified title? (y/n): ")
      ^
      ./dev/merge_spark_pr.py:493:11: F821 undefined name 'raw_input'
      while raw_input("\n%s (y/n): " % pick_prompt).lower() == "y":
      ^
      ./dev/create-release/releaseutils.py:58:16: F821 undefined name 'raw_input'
      response = raw_input("%s [y/n]: " % msg)
      ^
      ./dev/create-release/releaseutils.py:152:38: F821 undefined name 'unicode'
      author = unidecode.unidecode(unicode(author, "UTF-8")).strip()
      ^
      ./python/setup.py:37:11: F821 undefined name '_version_'
      VERSION = _version_
      ^
      ./python/pyspark/cloudpickle.py:275:18: F821 undefined name 'buffer'
      dispatch[buffer] = save_buffer
      ^
      ./python/pyspark/cloudpickle.py:807:18: F821 undefined name 'file'
      dispatch[file] = save_file
      ^
      ./python/pyspark/sql/conf.py:61:61: F821 undefined name 'unicode'
      if not isinstance(obj, str) and not isinstance(obj, unicode):
      ^
      ./python/pyspark/sql/streaming.py:25:21: F821 undefined name 'long'
      intlike = (int, long)
      ^
      ./python/pyspark/streaming/dstream.py:405:35: F821 undefined name 'long'
      return self._sc._jvm.Time(long(timestamp * 1000))
      ^
      ./sql/hive/src/test/resources/data/scripts/dumpdata_script.py:21:10: F821 undefined name 'xrange'
      for i in xrange(50):
      ^
      ./sql/hive/src/test/resources/data/scripts/dumpdata_script.py:22:14: F821 undefined name 'xrange'
      for j in xrange(5):
      ^
      ./sql/hive/src/test/resources/data/scripts/dumpdata_script.py:23:18: F821 undefined name 'xrange'
      for k in xrange(20022):
      ^
      20 F821 undefined name 'raw_input'
      20

        Attachments

          Activity

            People

            • Assignee:
              cclauss cclauss
              Reporter:
              cclauss cclauss
              Shepherd:
              Holden Karau
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: