Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add an interface to allow calling system
keyring
#11589Add an interface to allow calling system
keyring
#11589Changes from 15 commits
b87ddb9
edc588c
4cbae5b
efa7f2b
7e93102
6ec0af5
f5c96b1
43abcf0
5137ce2
4fc2008
888c3b6
996d4fa
4f8a613
3a15e01
8d9ea8b
c04222f
e6e42de
14a3d93
623ac5d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Since we only return a provider if the backend is available anyway, I wonder if it’d be easier to do something like
This avoids a few
is_available
checks.I also wonder whether it’d be a good idea to have a
KeyRingNullProvider
that always fails; this should help localise theKEYRING_DISABLED
logic inget_keyring_provider
and eliminate someis None
checks.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.
I think there is an advantage to delaying the
import keyring
untilget_keyring_provider
is called. It means that if the user has provided a password we won't bother trying to importkeyring
(which from what I've heard can be very slow!).I've implemented your idea of having a
KeyRingNullProvider
, doing away withis_available
, and simplifying theKEYRING_DISABLED
logic. This necessitates removing the cache onget_keyring_provider
but that's probably fine.