-
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
Exception from truststore when installing editable pip using not editable pip #12864
Comments
Damian and I investigated this issue on the PyPA Discord. Here's a Discord link to the start of the conversation, but I will provide a summary of the important bits here as those details belong here anyway :) The root issue is that the pip self version check uses its own requests session1. pip/src/pip/_internal/cli/index_command.py Lines 159 to 166 in 8eadcab
Within the initialization of a new session, the truststore context is augmented with the certifi CA bundle. pip/src/pip/_internal/cli/index_command.py Lines 45 to 47 in 8eadcab
It's this line, specifically the There are two logs because there are two sessions being initialized2, one for the install command and the other for pip's self version check. This can be inferred from the details, but I want to make it clear that this only affects the installation of pip itself. So, this isn't strictly a blocker for 24.2 as previously thought. Also, the resulting installation is unaffected as the self version check runs at the very end of the pip invocation, after the command terminates. However, I'll note that the exception discarding we do during the version check is useless as the session is created and errors out before the try... except block. I haven't investigated potential solutions yet (it's late and I should go to bed soon), but I'd imagine one of the simpler patches would be to change the self version check to reuse the same This issue also raises a larger question of whether we want to one day move pip off of certifi entirely. According to @notatallshaw, previously the truststore feature in 24.1 disabled certifi outright. Thus, developers and organisations who wanted to avoid using certifi could've used Footnotes
|
Fixed by #12865 |
Description
This is on pip main, I think after #11647 has landed, when you install pip in editable mode using pip in not editable mode you get an exception, although the installation itself appears to succeed.
Expected behavior
No exception on editable install
pip version
24.2
Python version
3.12
OS
Linux
How to Reproduce
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: