-
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
Vendor keyring & keyring-subprocess #11399
Conversation
…t opt in. Opting in is done by installing keyring-subprocess[landmark] and making sure the keyring-subprocess executable it provides can be found on the PATH.
d145abb
to
024bfdd
Compare
Woow, you got that merged quick! Time to take a look. My first question to answer by studing the code would be "how does this interact with activating a virtual environment which has keyring as a dependency?". I suspect I will end up closing this PR. |
Yeah, the code that got merged defaults to using a locally installed Additionally, with the addition of the Super cool possibilities. |
There’s an issue on not automatically importing keyring #8719. Perhaps we should make the option multi-choice (no keyring, force subprocess, and force import)? |
The issue is that if we're just looking on PATH with I like the idea of making it up to the user which option is used though! A lot. |
Not always, say you can do
But I get your point, the subprocess implementation preferring the same keyring in the same environment is still a problem in many situations. Also for the Poetry issue specifically, |
You/it got my vote! For whatever that is worth... (it referring to your idea, not you. Regardless of who might end up implementing it.)
I guess shutil.which's path parameter can be used after using the sysconfig module to remove the From what I can tell by just studying the code that should work after a tiny change in our setup. (include a username in the URL.) |
Yup it also requires us to set the username. We're using the Google Artifact Registry keyring backend. |
I forgot, then I remembered but didn't have time, then I forgot again, but I finally remembered again! It doesn't work on Windows due to hardcoding Other than that it works great! My fear of it tripping up Poetry turned out to be a nothing burger as you expected, @uranusjr . Time to create a very quick bug report... |
I went ahead and made a proper PR for what I first talked about in #8719 (comment)
Q: But
keyring
has C dependencies, how do you expect this to work?A: Some of
keyring
's first party backend's have C dependencies, we won't be using those and instead use mykeyring-subprocess
library's pure Python backend. Therefore we don't actually need to vendor them. If you would like I can alter thevendoring
configuration to make sure those backend's are not vendored.Fixes #8719
Can be an alternative, or in addition to: #11215. Which fixes the same issue.
Would go very well together with #11029
I still haven't looked at the Pip zipapp implementation and what that means for keyring users. I only know keyring and truststore being exceptions to the vendoring rule came up.
Related: pypa/pipx#829 would no longer be something would want