-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Upgrade truststore to 0.9.2 #12929
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
Upgrade truststore to 0.9.2 #12929
Conversation
Btw, just so I understand the user experience, does pip catch |
@notatallshaw Great question, pip catches the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
It would be nice though if @mayeut could confirm that pip gracefully falls back to certifi only on GraalPy now. I don't happen to have a GraalPy installation around. |
Tested this from a manylinux container and it works.
|
The difference in UX comes from pip/src/pip/_internal/cli/index_command.py Lines 28 to 47 in 81041f7
Unless adding specific code for graalpy there's nothing much that can be done (we still want the warning if something goes wrong on other interpreters). We're in a bit of a gray area between Python 3.10 & Python 3.13. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*sigh* alright. The duplicate warning is due to the second PipSession
being constructed during the pip self version check. IMHO that warning should be suppressed or downgraded to a debug message.
Is this ready to go? |
If we consider the potentially noisy "Disabling truststore because platform isn't supported" warning acceptable. Frankly, I have no strong opinions. I'm of the opinion that it should be downgraded to VERBOSE (or DEBUG) as in most situations, the fact truststore is unsupported is "fine" and not something users will notice.. while they will notice the extra and often duplicated warning. |
Although currently the way to explicitly enable the certifi code path is via
update: sorry, PEBKAC |
What can the user do though? At some point, pip may transition to only using truststore and falling back to certifi only when it's utterly unavailable, but I doubt we'll dump certifi entirely. Not only is it impossible until we require Python 3.10+ but there are going to be environments that are essentially unfixable (unless truststore is improved to work on everything including a toaster :P) I don't like low-value, high noise warnings. Ideally, we'd only raise this warning when the user would likely benefit from truststore, like if they're using a custom index or a proxy, but that is way too much work. Anyway, there isn't much we can do to improve this other than to get rid of the duplicated warning, but that isn't something I'm going to take on myself. |
That makes sense, but then if certify is here to stay, don't we need a proper option to select the certificate backend, instead of |
Closes #12892 Thanks @mayeut for reporting and @ichard26 for following this one all the way to the end :)