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

tox doesn't work with older pip versions like 1.4.1 #228

Closed
pytoxbot opened this issue Sep 17, 2016 · 12 comments
Closed

tox doesn't work with older pip versions like 1.4.1 #228

pytoxbot opened this issue Sep 17, 2016 · 12 comments

Comments

@pytoxbot
Copy link

When running bin/tox with pip 1.4.1 (and pyrun) you get:

Could not run 'bin/tox': No module named req_file

Looking into the code, this line is causing it:

lib/python2.7/site-packages/tox/_config.py:
-- from pip.req.req_file import parse_requirements

The current pip does come with a req_file module. It was added in Jan 2014 and released in version 6.0 of pip.

The setup.py of tox does not define a dependency on pip:

https://bitbucket.org/hpk42/tox/src/aa5b7ce560ca7cc27ed609fad8d2678a9e6836ac/setup.py?at=default

I guess it would be good to define the minimum version with which tox works.

@pytoxbot
Copy link
Author

Original comment by @theMarix

Works fine for us now. Thanks!

@pytoxbot
Copy link
Author

Original comment by @malemburg

Right, I was testing the version Holger had asked to test. With the released version, everything works fine - even with pip 1.4.1. Thanks.

@pytoxbot
Copy link
Author

Original comment by mriedem

Yup, works for me, thanks for turning this around so quickly!

@pytoxbot
Copy link
Author

Original comment by @cedk

@malemburg It doesn't seem you are installing the released 1.9.2 version
The final fix was not to add a dependency to pip but to backout the new functionality that depended on it.

@pytoxbot
Copy link
Author

Original comment by @malemburg

Doesn't seem to help:

#!python

tmp/test-tox-2> bin/pip install https://devpi.net/hpk/dev/+f/fb2/4aa9fdf22e2a6/tox-1.9.2.dev2.tar.gz
...
tmp/test-tox-2> bin/tox
Traceback (most recent call last):
  File "bin/tox", line 8, in <module>
    load_entry_point('tox==1.9.2.dev2', 'console_scripts', 'tox')()
  File
"/home/lemburg/tmp/test-tox-2/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py",
line 318, in load_entry_point
  File
"/home/lemburg/tmp/test-tox-2/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py",
line 2221, in load_entry_point
  File
"/home/lemburg/tmp/test-tox-2/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py",
line 1954, in load
  File "/home/lemburg/tmp/test-tox-2/lib/python2.7/site-packages/tox/__init__.py", line 23, in <module>
    from tox._cmdline import main as cmdline  # noqa
  File "/home/lemburg/tmp/test-tox-2/lib/python2.7/site-packages/tox/_cmdline.py", line 15, in <module>
    from tox._venv import VirtualEnv
  File "/home/lemburg/tmp/test-tox-2/lib/python2.7/site-packages/tox/_venv.py", line 6, in <module>
    from tox._config import DepConfig
  File "/home/lemburg/tmp/test-tox-2/lib/python2.7/site-packages/tox/_config.py", line 13, in <module>
    from pip.download import PipSession
ImportError: cannot import name PipSession

I had pip 1.4.1 installed and would have expected tox to upgrade this
to pip 6.0

@pytoxbot
Copy link
Author

Original comment by @hpk42

  • backout ability that --force-deps substitutes name/versions in
    requirement files due to various issues.
  • This fixes issue228, fixes issue230, fixes issue231
    which popped up with 1.9.1.
  • bump to 1.9.2 version

→ <<cset 452288d6c500>>

@pytoxbot
Copy link
Author

Original comment by @hpk42

could some of you try pip install https://devpi.net/hpk/dev/+f/fb2/4aa9fdf22e2a6/tox-1.9.2.dev2.tar.gz and see if it works within your environments? I think the problem was simply that we need to import from pip.req instead of pip.req.req_file. cc @sontek

@pytoxbot
Copy link
Author

Original comment by vladimir-lu-work

I've raised an issue against Jenkins: https://issues.jenkins-ci.org/browse/JENKINS-27551

@pytoxbot
Copy link
Author

Original comment by @cedk

I submitted the pull request #139

@pytoxbot
Copy link
Author

Original comment by mriedem

+1, just started hitting this today in our CI with the tox 1.9.1 release.

@pytoxbot
Copy link
Author

Original comment by @cedk

I agree this is a very annoying issue when using tox for CI.

@pytoxbot
Copy link
Author

Original comment by @theMarix

I also ran into this issue. Tox 1.9.1 has a code dependency on pip>=6.0 which is not declared in the package dependencies. Please fix this, as it causes surprising failures and forces us to add unnecessary additional set-up logic to our CI environment.

Note that this requirement does not exist for tox 1.9.0, which in my opinion violates semantic versioning.

@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant