Closed cooperlees closed 7 years ago
@cooperlees The problem is that the outdated code uses PyPI's JSON API and it sort of purposely talks directly to PyPI and ignores the local repositories so that a stale mirror doesn't keep people pinned back.
So there are a few options here:
pip --disable-pip-version-check ...
.Thanks for the quick reply! 1) I feel if people allow their local mirror to go stale that's their own problem 🤡 ... #monitoring
How about for now I look at a 'use_local_mirror_for_pip_upgrade' option in pip.conf and adding code to respect that for those who want it in outdated.py + deps?
Yea, it can be done via configuration too (all of pip's options are available as a CLI flag, an environment variable, and configuration flag).
Overall though, I am generally against adding configuration options if we can help it. I'd personally prefer to just drop the use of JSON all together and rely on PackageFinder
configured the same as pip install
would to locate the latest version rather than adding a configuration option to switch between them. How the outdated check happens should be an implementation detail.
If this seems like something that would work for you, the quickest way to get this change in would be to submit a PR.
Working on a PR: https://github.com/pypa/pip/pull/4308
I think this has fallen in a crack and was fixed by #4336
Yes. That was me. Been waiting for 9.1.0 to confirm, but let's just assume it works for now.
Description:
Running pip commands in a virtualenv where no direct Internet connection is available to hang as it's trying to talk to pypi.python.org. We have a local PyPI Mirror (synced via bandersnatch) running that is reachable. It's configured as such:
[global] timeout = 10 index-url = https://pypi.somecompanyiworkfor.com/simple
What I've run:
pip freeze -v: http://pastebin.com/iL2ZtCaQ