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

Pip version 8 incompatibility (--download-cache option removed) #308

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

Pip version 8 incompatibility (--download-cache option removed) #308

pytoxbot opened this issue Sep 17, 2016 · 7 comments

Comments

@pytoxbot
Copy link

When using tox version 2.3.1 and pip version 8.x I get the following error when tox attempts to install my "deps" (deps = -rtest-requirements.txt).

 no such option: --download-cache

ERROR: could not install deps [-rtest-requirements.txt]; v = InvocationError('/home/travis/build/waylan/Python-Markdown/.tox/py27/bin/pip install --download-cache=/home/travis/build/waylan/Python-Markdown/.tox/cache -rtest-requirements.txt (see /home/travis/build/waylan/Python-Markdown/.tox/py27/log/py27-1.log)', 2)

It is clear that tox is calling pip install with the --download-cache flag, which was deprecated in pip version 6.0 and removed in 8.0 (see release notes). Interestingly, after seeing the error on Travis, I tested on my local machine by first upgrading pip to version 8 before upgradting tox and on tox version 2.2.1 no error was raised with pip version 8. However, once I upgraded tox to 2.3.1 the error appeared.

@pytoxbot
Copy link
Author

Original comment by rubik

Unfortunately that's not the case with my tox.ini file. I had to manually edit tox source to disable that option.

@pytoxbot
Copy link
Author

Original comment by nashef

My tox.ini file had a downloadcache= line that I needed to remove.

@pytoxbot
Copy link
Author

Original comment by rubik

I have this problem as well. However, downgrading tox to version 2.2.1 did not help. Any suggestions?

@obestwalter
Copy link
Member

obestwalter commented Nov 3, 2016

This bug is hanging around for quite a while now, so I am wondering if this is still an issue?

@hpk42
Copy link

hpk42 commented Nov 5, 2016

tox only adds --download-cache to pip invocations if downloadcache is configured in the test environment. I wonder if we could instead add a --cache-diroption or if we should deprecate the downloadcache option and ignore it with tox-2.5. It's after all easy enough to now add it to install_command. It probably doesn't make sense to keep the current logic as pip-8 does not have a --downloadcache. I am not sure what the relation, history of --cache-dir and --download-cache is and couldn't figure it out from pip's changelog. Maybe @dstufft can shed some quick light?

@dstufft
Copy link

dstufft commented Nov 5, 2016

--download-cache is an old thing that pip used to have which was a custom built cache that only worked on download files. It was opt-in and thus few people used it. However, in uh, pip 6 I think we removed it (and no-op'd the flag until pip uh 8 I guess)and replaced it with two different caches, one is a HTTP cache that works for all HTTP requests (assuming they have CacheControl headers or so) and a wheel cache that caches built wheels from a sdist. These new caches are placed under --cache-dir, and are opt-out.

My suggestion would be to just remove downloadcache. The other flag shouldn't need to be used in the general case (it is designed to do the right thing by default) and if someone really has a need they can use install_command.

@hpk42 hpk42 closed this as completed in ac1b57a Nov 6, 2016
hpk42 added a commit that referenced this issue Nov 6, 2016
fix #308 - ignore downloadcache setting
rogalski pushed a commit to rogalski/tox that referenced this issue Nov 6, 2016
@ghost
Copy link

ghost commented Oct 16, 2017

I found the npm cache clean --force worked for me

@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

4 participants