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_DISABLE_PIP_VERSION_CHECK=1 #19

Open
jayvdb opened this issue Jul 1, 2019 · 2 comments
Open

PIP_DISABLE_PIP_VERSION_CHECK=1 #19

jayvdb opened this issue Jul 1, 2019 · 2 comments

Comments

@jayvdb
Copy link

jayvdb commented Jul 1, 2019

If the user has set a desired pip version, especially if a precise pin, there is no need for pip to do its version check.

PIP_DISABLE_PIP_VERSION_CHECK=1 disables that.

Any reason not to add this?

@pglass
Copy link
Owner

pglass commented Jul 1, 2019

Hmm, I'm not sure I want to disable the check by default.

If you want to disable the warning, you can always set that environment variable in tox.ini with setenv/passenv as needed.(if pip environment vars aren't working with tox-pip-version, that's a big bug)

Although, don't feel too strongly about it. I wouldn't be opposed to a PR that added it.

@jayvdb
Copy link
Author

jayvdb commented Jul 3, 2019

The reason I thought it would be useful to support PIP_DISABLE_PIP_VERSION_CHECK=1 is that a precise pinned pip is expected to be the version which was installed, and not some other version, and this check is both extra time consuming network hits, and it is junk in the tox logs when the result of the check is self-evident because pip was pinned. The only value it adds is pushing into the log the answer to "what is the most recent pip at this moment".

Another one worth considering support for is PIP_UPGRADE_STRATEGY=only-if-needed.

Since pip 10, PIP_UPGRADE_STRATEGY=only-if-needed is the default, because PIP_UPGRADE_STRATEGY=eager is a feature which doesnt work in practise because pip still doesnt (afaik) processes all requirements at once as an atomic transaction, ensuring all requirements and constraints are met before making decisions, and it also has troubles rolling back.

While users can set these env vars themselves, that is beyond many people's ability / capacity / interest levels, as it requires reading the tox & pip docs, quite carefully to realise that pip uses envvars, and they can be passed through tox to its internal pip. They may even decide that some configuration is unsupportable because there was no way to switch off the behaviour they saw. tox-pip-version having switches with sensible defaults helps those who dont

https://github.com/asottile-archive/tox-virtualenv-no-download/blob/master/tox_virtualenv_no_download.py is effectively a plugin which only sets one envvar which could have been set by the user. Arguably its existence resulted in tox 3.10 changing its default behaviour, or at least was a catalyst.

As it sounds like pip might also be making this plugin redundant, I'll hold off providing a PR. I'm just getting ideas written down somewhere relevant :-)

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

No branches or pull requests

2 participants