-
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
pip 24.1b1 downgrade to pip 24.0 throws an exception #12675
Comments
Ugh, this is my fault. #12637 made the pip self-version check import TL;DR, lazy imports are unsafe when pip reinstalls itself. Solutions are:
I'd prefer option one, but I'll prepare the revert PR as stability is more important. |
Personally I think this makes logical sense anyway. If I am changing the version of pip I don't need pip to tell me that pip is outdated. |
And just to double emphasise, the impact is relatively minor here, the downgrade completes:
The error is thrown after the install. |
Actually, I guess a valid third option is to suppress all exceptions encountered during the pip self-version check. AFAIK network errors are already suppressed (with a warning). |
OK I implemented option 1 locally, but one wrinkle is that it doesn't protect source dir downgrades from blowing up. It just blew up as I was running |
Maybe we could keep the on-demand imports, but also add a check before installation to see if pip is going to be touched? If pip is going to be modified, we could eagerly import the things that generally need to be on-demand. This way the old modules would already be in memory and should be able to perform correctly. |
Description
When you install pip 24.1 beta into Python 3.10 Linux environment and then try to downgrade to pip 24.0 you get an error, although it appears the downgrade works the error is rather unfriendly
Expected behavior
You can downgrade without exception
pip version
24.1b1
Python version
Python 3.10.14
OS
Linux
How to Reproduce
Output
The text was updated successfully, but these errors were encountered: