Skip to content
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

keyring.delete_password(service, username) deletes all passwords for that service #123

Closed
jaraco opened this issue Feb 24, 2015 · 5 comments

Comments

@jaraco
Copy link
Owner

jaraco commented Feb 24, 2015

In Ubuntu 12.04 using keyring3.1

#!python

>>> import keyring

>>> keyring.set_password('jacks', 'cold', 'sweat')
>>> keyring.get_password('jacks', 'cold')
u'sweat'
>>> keyring.set_password('jacks', 'smirking', 'revenge')
>>> keyring.get_password('jacks', 'smirking')
u'revenge'
>>> keyring.delete_password('jacks', 'cold')
>>> keyring.get_password('jacks', 'smirking')
>>>

It seems that all passwords for the given service are deleted when a delete_password call is made.

This does not happen in OS X (10.8.5)


I guess the discrepancy would lie between these two methods.

keyring.backends.OS_X.Keyring.delete_password

keyring.backends.file.BaseKeyring


@jaraco
Copy link
Owner Author

jaraco commented Feb 24, 2015

Will have a fix for that soon.


Original comment by: Dmitry Shachnev

@jaraco jaraco closed this as completed Feb 24, 2015
@jaraco
Copy link
Owner Author

jaraco commented Feb 24, 2015

Thanks Dmitry. Indeed, delete_password should only ever delete a single password. Perhaps we should build a test for that into the base test helper.


Original comment by: Jason R. Coombs

@jaraco
Copy link
Owner Author

jaraco commented Feb 24, 2015

Fixed in pull request #38.


Original comment by: Dmitry Shachnev

@jaraco
Copy link
Owner Author

jaraco commented Feb 24, 2015

Merged in mitya57/python-keyring-lib (pull request #38)

Fix items deleting in file keyring (Fixes #123), add a test for that

→ <>


Original comment by: Jason R. Coombs

@jaraco
Copy link
Owner Author

jaraco commented Feb 24, 2015

Fix items deleting in file keyring (Fixes #123), add a test for that

→ <>


Original comment by: Jason R. Coombs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant