-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Remove self_outdated_check? #8458
Comments
How about adding to the message that this is perfectly fine, and he could ignore the message and proceed to do whatever he wants to do? Some thing like this.
|
The problem is that it's not "perfectly fine" to ignore this. We're still very actively working on modernising a lot of pip's packaging standards, and if people don't upgrade, then it becomes much harder to progress with those standards. Standards like Maybe nagging people to upgrade isn't the best approach, but it's not obvious what would work better. |
Thank you @pfmoore for the response. How about showing the warning at the beginning of the output, rather than the end? That way it will still be prominent, but does not obscure the result of the user's command. For example:
This seems more conventional to me, and in fact the top is where pip displays its other warnings, such as "pip 21.0 will drop support for Python 2.7 in January 2021..." and "The directory '%s' or its parent directory is not owned or is not writable by the current user...". For comparison this is how Heroku suggests updates also:
It looks like this can be done by moving the line What do you think? |
I think moving the warning to the top is a good idea. |
I have to say that this message did not help build a lot of love for pip itself. I found it bit invading, especially as it was too aggressive. While I can understand that using a 2 years old pip version does deserve a warning, I do not think that a two week one should. I would even suggest not checking for newer versions unless current one is not older than 30-60 days maybe? While I stopped using Windows more than decade ago, I do still find memes about Windows Update and Clippy ;) Yep, I do find npm approach nicer, also use of colors is highly appreciated. There is also another aspect that we may consider: how about displaying the warning only if pip exists without a success code. and even mentioning to try again with latest release? I can understand that we do not want more bugs about old versions and with a project that make often releases, is not hard for this to happen even with engineers that know the drill. Maybe it is also the time to consider making pip bootstrapping itself like tox does. Tox is able to upgrade itself when needed without upgrading itself. |
+1, this warning is very annoying. I try to use The only way to avoid this warning (that I could find) is to systematically run |
@zsimic This check can be disabled via the |
To be clear, we probably could improve the way the warning is displayed (there are suggestions in this thread already). However, as @hugovk notes, it is possible to disable it now, so improvements are not a high priority (and no-one appears sufficiently motivated to create a PR, again suggesting this isn't a major pain point for people). The fact that new virtual environments are created with older pip versions is a specific design trade-off in virtualenv, trying to ensure that environment creation is fast by using a local copy of pip (which gets updated on a regular basis, but not immediately a pip release happens). Whether that trade-off has worked as well as people would like is a question for the virtualenv project, not for pip. |
Assuming you're on a recent virtualenv release, an easier approach would be to run |
My I'll see if I can carve some time to do a PR, see if I can make this a bit better. |
I'm hesitating to add yet another thing like I'm thinking ideally As a user, I'd love to let So, I'm thinking, if "use latest pip" is the recommended thing, then it should be the default (enforced by pip itself), with an opt-out possibly for whoever wants to not adhere to that. |
FYI I opened this PR a while back: #9111 |
-1 on update by default. That would probably result in even more complaints from users than the current warning... @oTree-org I closed and re-opened your PR to re-trigger the CI. It looks like there's at least a trailing whitespace issue to fix. If you want to continue working on that PR, I suggest you fix the issues and rebase on the latest main, and then it can be reviewed. |
This issue relates to the following warning:
I read the original rationale for this feature from 2013:
I am wondering if now may be a good time to consider that.
Firstly, this code could be deleted:
https://github.com/pypa/pip/blob/master/src/pip/_internal/self_outdated_check.py
https://github.com/pypa/pip/blob/master/tests/unit/test_self_check_outdated.py
And a number of issues would be go away, for example see:
#6443
#5346
#5420
#6468
But more important is the user experience. This warning is shown to a huge number of people, and can be one of the first things they see when they get started with Python (e.g. if they are learning Python to use a specific package).
Confusion
I frequently see users thinking this is an error. For example: https://youtu.be/k8NXfeItBdw?t=295
For a new user who is already overwhelmed by getting started with Python, you may be surprised how much they can get sidetracked by this warning. Furthermore, many people don't know how to copy/paste from their terminal window, so they type character by character. When the provided command is something like
They will likely get a typo, meaning they retype everything char by char.
This warning also obscures & distracts from actual errors. Here is a screenshot I got from a user who could not figure out why her installation was not working.
I don't blame them because for me the pip warning is the first thing my eye gets drawn to, especially because the wording is very direct ("you are", "you should"). I have also seen users who think that command will upgrade Python or all their pip-installed packages.
I know pip issues happen but is it often enough that all Python users need to be exposed to the warning by default, even if the pip command succeeded? There is a cost in distractions and "warning fatigue".
First impression of Python
For someone who is intimidated by beginning programming, dealing with messages like these can be discouraging. To build up people's confidence, it would be nice if the first impression of Python is that everything "just works".
It may also seem lame to a user that as soon as they install Python, they are immediately told to upgrade.
Note about disable_pip_version_check
Although this check can be disabled via the --disable-pip-version-check and setting disable_pip_version_check = 1 in pip.conf, I don't think that is an effective solution, because:
The text was updated successfully, but these errors were encountered: