-
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
Adjust Python 2.7 EOL message #6231
Comments
So, how do we suppress the 2.7 deprecation message with |
@pradyunsg I think this should go in the next release in some form — unless you’re planning another patch release not long after. My concern is that if the message is too annoying without an easy way to suppress, it could dissuade people from using this version of pip. I admit though I haven’t checked to see in what circumstances (e.g. which commands) the message currently displays. @defjaf I’m pretty sure there’s not currently a way to do it with pip config, which is why he said “add an option” in the original comment above. |
All invocations on Python 2.7.
I am not warm to the idea of making a 19.0 series release, post 19.0.2. If someone is willing to write a PR to suppress python-version related deprecation warnings in pip, I'm OK to get them in the next release but I won't block 19.0.2 on it. If it misses that window, this would have to wait till 19.1, which will be in April. |
#6126 might provide this |
Some context from the coal face: I have some C/C++ code using Conan to build with dependencies on various libraries. Overall the experience decreased my confidence in both Conan and Python/Pip suitability for the task. In other words: I suggest to simply remove the message. It's simply not actionable from my point of view, Python 2.7 will continue to need pip, regardless of 2020. |
Additional discussion on this issue occurred here: https://discuss.python.org/t/pip-19-0-is-now-available/757 |
@nigels-com I've modified your message to have a slightly milder tone, to avoid it contributing to potentially burning out contributors and other maintainers of pip. If you don't find that edit appropriate, please free free to ping me anywhere other than on this issue (like my username @gmail.com or on twitter by the same username or in a new issue on this repo). |
@pradyunsg I'm supportive of your effort to keep things mild. We in 2.7 land just want to get on with things without undue or unintended friction. |
Personally, I think anyone who wants to help "get this fixed" is welcome to help us take #6126 forward, which is a long term fix for this issue and related issues. That would provide a mechanism to users who don't care about certain kinds of messages to silence them while allowing the maintainers to provide useful hints to users who might not know as much. If you care about silencing the Python 2.7 depreciation message, you should also be willing to set certain configuration options to disable such messages. #6126 is the mechanism to suppress such messages. So, no, I'm personally not amicable to removing this message. I am amicable to providing a decent mechanism to hide this error message and genuinely prefer a general mechanism for filtering messages from within pip. |
Thanks!
I understand and empathize. I don't disagree with your requirement -- we should provide you a mechanism to silence that message. I don't think removing it for everyone is the right way to do it. :) |
FWIW, you can suppress that message today with an environment variable:
|
An opt-out policy is a step in the right direction. Appreciated. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I think we can break this issue into 2 smaller issues, each of which can be worked on independently:
These would both be good first issues for first time contributors. If no one voices any concerns, I'm going to do this and close this issue sometime in the next 24 hours. self-notes, in case we break it uphello there, if you're reading this, please let me know if there are any improvements I can make to the issue descriptions below. There is a feature request to be able to silence Python version related warnings that pip emits (try running pip 19 on Python 2.7 to see what that means). The way we want to handle this request is to add a new flag/command line option, similar to Additional references:
This is a moderately complex issue that can serve as starting point for anyone who wants to help out with pip's development -- the process of fixing this should be a good introduction to pip's development workflow. The error message that pip prints when run on Python 2.7 is not very informative about what timeline pip would use before dropping support or how it might approach it. |
Click to see rant (hidden by maintainers)I can't wait to still be dealing with The Python Every Non-Trivial Software System Having Made The Mistake Uses vs. The Python They Want You To Use in 2030 (as if ANSI-decorated messages will have had any effect to the contrary). Anyway, there is a cleaner alternative to setting the import os, site
if site.ENABLE_USER_SITE: os.path.join(site.getusersitepackages(), 'usercustomize.py')
# -> '/home/mdl/.local/lib/python2.7/site-packages/usercustomize.py' Hooray. Now squirt this into that file: try:
import warnings
warnings.filterwarnings('ignore', 'DEPRECATION',
module='pip._internal.cli.base_command')
except ImportError: pass Ride the snake. |
@pradyunsg Is it okay to discuss this in a separate issue / PR so this can be merged?
Originally posted by @cjerdonek in #6208 (comment)
The text was updated successfully, but these errors were encountered: