Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-5044

backports.tempfile not supported in python 2.6

    Details

      Description

      Lars Volker Can you take a look?

      ==================================== ERRORS ====================================
      ______________ ERROR collecting query_test/test_insert_parquet.py ______________
      ../infra/python/env/lib/python2.6/site-packages/_pytest/python.py:611: in _importtestmodule
          mod = self.fspath.pyimport(ensuresyspath=importmode)
      ../infra/python/env/lib/python2.6/site-packages/py/_path/local.py:662: in pyimport
          __import__(modname)
      ../infra/python/env/lib/python2.6/site-packages/_pytest/assertion/rewrite.py:171: in load_module
          py.builtin.exec_(co, mod.__dict__)
      query_test/test_insert_parquet.py:26: in <module>
          from backports.tempfile import TemporaryDirectory
      E     File "/data/jenkins/workspace/impala-asf-master-exhaustive-integration/repos/Impala/infra/python/env/lib/python2.6/site-packages/backports/tempfile.py", line 26
      E       kwargs = {k: v for (k, v) in
      E                        ^
      E   SyntaxError: invalid syntax
      

        Activity

        Hide
        mikesbrown Michael Brown added a comment -
        commit cc8a11983945fe3409f4693431774733923a0222
        Author: Michael Brown <mikeb@cloudera.com>
        Date:   Wed Mar 8 09:02:23 2017 -0800
        
            IMPALA-5044: test infra: remove backports.tempfile
        
            backports.tempfile is not compatible with Python 2.6, so if Python 2.6
            is the Python used for end-to-end tests, this test unconditionally
            fails.  Moreover, Py.test provides a builtin tmpdir fixture with
            equivalent functionality. Remove the requirement and port tests using
            backports.tempfile.TemporaryDirectory to use tmpdir.
        
            Change-Id: I887b62eb1b3425fc8fd62562e28f0c17cb261f6d
            Reviewed-on: http://gerrit.cloudera.org:8080/6316
            Reviewed-by: Michael Brown <mikeb@cloudera.com>
            Tested-by: Impala Public Jenkins
        
        Show
        mikesbrown Michael Brown added a comment - commit cc8a11983945fe3409f4693431774733923a0222 Author: Michael Brown <mikeb@cloudera.com> Date: Wed Mar 8 09:02:23 2017 -0800 IMPALA-5044: test infra: remove backports.tempfile backports.tempfile is not compatible with Python 2.6, so if Python 2.6 is the Python used for end-to-end tests, this test unconditionally fails. Moreover, Py.test provides a builtin tmpdir fixture with equivalent functionality. Remove the requirement and port tests using backports.tempfile.TemporaryDirectory to use tmpdir. Change-Id: I887b62eb1b3425fc8fd62562e28f0c17cb261f6d Reviewed-on: http://gerrit.cloudera.org:8080/6316 Reviewed-by: Michael Brown <mikeb@cloudera.com> Tested-by: Impala Public Jenkins
        Hide
        mikesbrown Michael Brown added a comment -

        I think I can fix this.

        Show
        mikesbrown Michael Brown added a comment - I think I can fix this.
        Hide
        mikesbrown Michael Brown added a comment -

        py.test provides a tmpdir builtin fixture.

        http://doc.pytest.org/en/latest/tmpdir.html

        I can only find rendered py.test docs for "latest". We have 2.9.2.

        https://github.com/pytest-dev/pytest/blob/978bb190a14d04634dffa1018dce2a5ead404efa/doc/en/tmpdir.rst Is the way to read the 2.9.2-specific doc about tmpdir.

        Show
        mikesbrown Michael Brown added a comment - py.test provides a tmpdir builtin fixture. http://doc.pytest.org/en/latest/tmpdir.html I can only find rendered py.test docs for "latest". We have 2.9.2. https://github.com/pytest-dev/pytest/blob/978bb190a14d04634dffa1018dce2a5ead404efa/doc/en/tmpdir.rst Is the way to read the 2.9.2-specific doc about tmpdir.
        Hide
        mikesbrown Michael Brown added a comment -

        https://pypi.python.org/pypi/backports.tempfile/1.0rc1 suggests what evidence we see: that it only works with Python 2.7, not Python 2.6 or before.

        Show
        mikesbrown Michael Brown added a comment - https://pypi.python.org/pypi/backports.tempfile/1.0rc1 suggests what evidence we see: that it only works with Python 2.7, not Python 2.6 or before.

          People

          • Assignee:
            mikesbrown Michael Brown
            Reporter:
            mikesbrown Michael Brown
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development