Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with implementation_name env marker on py34 #2214

Closed
andy-maier opened this issue May 3, 2020 · 3 comments
Closed

Issue with implementation_name env marker on py34 #2214

andy-maier opened this issue May 3, 2020 · 3 comments

Comments

@andy-maier
Copy link
Contributor

On Python 3.4 with minimum package levels, make installtest fails because Pip stumbles across the use of the implementation_name env marker in dev-requirements.txt and minimum-constraints.txt that was introduced with PR #2200 on the typed-ast package:

makefile: Running install tests
tests/installtest/test_install.sh dist/pywbem-1.0.0.dev1-py2.py3-none-any.whl dist/pywbem-1.0.0.dev1.tar.gz python
Preparing for the tests
Creating test directory: tests/installtest/../../tmp_installtest
Creating source archive unpack directory: tests/installtest/../../tmp_installtest/src_dist
Removing .egg file: tests/installtest/../../dist/pywbem*.egg
Testcase test1: Pip install from repo root directory: tests/installtest/../..
Saving current virtualenv: /home/travis/virtualenv/python3.4.8
Creating virtualenv: tests/installtest/../../tmp_installtest/virtualenvs/pywbem_test_test1
..using this Python command: /home/travis/virtualenv/python3.4.8/bin/python
..that has this Python version: Python 3.4.8
Activating virtualenv: tests/installtest/../../tmp_installtest/virtualenvs/pywbem_test_test1
Python command in this virtualenv: /home/travis/build/pywbem/pywbem/tmp_installtest/virtualenvs/pywbem_test_test1/bin/python
Python version in this virtualenv: Python 3.4.8
Packages in this virtualenv before reinstalling base packages:
pip (8.0.0)
setuptools (19.4)
wheel (0.26.0)
Reinstalling setuptools with PACKAGE_LEVEL=minimum
Error: Command failed with rc=2: pip install setuptools -c /home/travis/build/pywbem/pywbem/minimum-constraints.txt, output follows:
Ignoring pip: markers "python_version == '3.6'" don't match your environment
Ignoring pip: markers "python_version == '3.7'" don't match your environment
Ignoring pip: markers "python_version >= '3.8'" don't match your environment
Ignoring setuptools: markers "python_version == '3.7'" don't match your environment
Ignoring setuptools: markers "python_version >= '3.8'" don't match your environment
Ignoring wheel: markers "python_version == '3.7'" don't match your environment
Ignoring wheel: markers "python_version >= '3.8'" don't match your environment
Ignoring PyYAML: markers "python_version == '2.7'" don't match your environment
Ignoring six: markers "python_version >= '3.8'" don't match your environment
Ignoring funcsigs: markers "python_version < '3.3'" don't match your environment
Ignoring pytest: markers "python_version >= '3.7'" don't match your environment
Ignoring colorama: markers "python_version >= '3.5'" don't match your environment
Ignoring virtualenv: markers "python_version >= '3.5' and python_version < '3.8'" don't match your environment
Ignoring virtualenv: markers "python_version >= '3.8'" don't match your environment
Ignoring pluggy: markers "python_version >= '3.7'" don't match your environment
Ignoring lxml: markers "python_version >= '3.8'" don't match your environment
Ignoring pylint: markers "python_version == '2.7'" don't match your environment
Ignoring pylint: markers "python_version >= '3.5'" don't match your environment
Ignoring astroid: markers "python_version == '2.7'" don't match your environment
Ignoring astroid: markers "python_version >= '3.5'" don't match your environment
Exception:
Traceback (most recent call last):
  File "/home/travis/build/pywbem/pywbem/tmp_installtest/virtualenvs/pywbem_test_test1/lib/python3.4/site-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/home/travis/build/pywbem/pywbem/tmp_installtest/virtualenvs/pywbem_test_test1/lib/python3.4/site-packages/pip/commands/install.py", line 287, in run
    wheel_cache
  File "/home/travis/build/pywbem/pywbem/tmp_installtest/virtualenvs/pywbem_test_test1/lib/python3.4/site-packages/pip/basecommand.py", line 264, in populate_requirement_set
    requirement_set.add_requirement(req)
  File "/home/travis/build/pywbem/pywbem/tmp_installtest/virtualenvs/pywbem_test_test1/lib/python3.4/site-packages/pip/req/req_set.py", line 224, in add_requirement
    if not install_req.match_markers():
  File "/home/travis/build/pywbem/pywbem/tmp_installtest/virtualenvs/pywbem_test_test1/lib/python3.4/site-packages/pip/req/req_install.py", line 799, in match_markers
    return markers_interpret(self.markers)
  File "/home/travis/build/pywbem/pywbem/tmp_installtest/virtualenvs/pywbem_test_test1/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py", line 190, in interpret
    return Evaluator(execution_context).evaluate(marker.strip())
  File "/home/travis/build/pywbem/pywbem/tmp_installtest/virtualenvs/pywbem_test_test1/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py", line 100, in evaluate
    return handler(node)
  File "/home/travis/build/pywbem/pywbem/tmp_installtest/virtualenvs/pywbem_test_test1/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py", line 163, in do_expression
    return self.evaluate(node.body)
  File "/home/travis/build/pywbem/pywbem/tmp_installtest/virtualenvs/pywbem_test_test1/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py", line 100, in evaluate
    return handler(node)
  File "/home/travis/build/pywbem/pywbem/tmp_installtest/virtualenvs/pywbem_test_test1/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py", line 127, in do_boolop
    result = self.evaluate(n)
  File "/home/travis/build/pywbem/pywbem/tmp_installtest/virtualenvs/pywbem_test_test1/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py", line 100, in evaluate
    return handler(node)
  File "/home/travis/build/pywbem/pywbem/tmp_installtest/virtualenvs/pywbem_test_test1/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py", line 147, in do_compare
    lhs = self.evaluate(lhsnode)
  File "/home/travis/build/pywbem/pywbem/tmp_installtest/virtualenvs/pywbem_test_test1/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py", line 100, in evaluate
    return handler(node)
  File "/home/travis/build/pywbem/pywbem/tmp_installtest/virtualenvs/pywbem_test_test1/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py", line 174, in do_name
    raise SyntaxError('invalid expression: %s' % node.id)
  File "<string>", line None
SyntaxError: invalid expression: implementation_name
makefile:693: recipe for target 'installtest' failed
@andy-maier
Copy link
Contributor Author

andy-maier commented May 3, 2020

Pip 8.0.0 that is used in that virtualenv does not yet have support for implementation_name. Pip 9.0.1 does. That suggests to first upgrade pip in test_installed.sh. The reason why test_installed.sh first installs setuptools and then pip is that in an earlier run, installing pip first caused a permission error. Trying again with order pip first.

@andy-maier andy-maier self-assigned this May 3, 2020
@andy-maier andy-maier added this to the 1.0.0 milestone May 3, 2020
@andy-maier
Copy link
Contributor Author

This isssue was fixed by removing the marker and installing pip first.

After fixing it, a second issue showed up on Python 3.4 with latest package levels, where pip was not installed into the virtualenv created by test_install.sh. Created virtualenv issue pypa/virtualenv#1809 for that. This could be circumvented by pinning virtualenv to 20.0.18 on py<3.5.

Both fixes and some more diagnostic output in test_install.sh are in PR #2215 for master. No rollback to 0.17 since the marker was not used there.

@andy-maier
Copy link
Contributor Author

Virtualenv 20.0.20 fixes the reported issue.
Changed PR #2215 to no longer pin virtualenv to <20.0.19 but to just exclude 20.0.19.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant