You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Using kdewallet I can see old keyring passwords listed in "Secret Service". New keyring passwords are listed under the "system" passed to set_password. I assume this is because I previously did not have keyring.backends.kwallet.DBusKeyring installed.
$ python3.11 -m keyring get system username correctly finds the old passwords. $ python3.11 -m keyring del system username fails as follows:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/jim/.local/lib/python3.11/site-packages/keyring/__main__.py", line 4, in <module>
cli.main()
File "/home/jim/.local/lib/python3.11/site-packages/keyring/cli.py", line 216, in main
return cli.run(argv)
^^^^^^^^^^^^^
File "/home/jim/.local/lib/python3.11/site-packages/keyring/cli.py", line 120, in run
return method()
^^^^^^^^
File "/home/jim/.local/lib/python3.11/site-packages/keyring/cli.py", line 157, in do_del
delete_password(self.service, self.username)
File "/home/jim/.local/lib/python3.11/site-packages/keyring/core.py", line 73, in delete_password
get_keyring().delete_password(service_name, username)
File "/home/jim/.local/lib/python3.11/site-packages/keyring/backends/chainer.py", line 63, in delete_password
return keyring.delete_password(service, username)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jim/.local/lib/python3.11/site-packages/keyring/backends/kwallet.py", line 150, in delete_password
raise PasswordDeleteError("Password not found")
keyring.errors.PasswordDeleteError: Password not found
Expected behavior
I would expect to be able to delete any password that I can read.
$ python3.11 -m keyring -b keyring.backends.SecretService.Keyring set testing test
Password for 'test' in 'testing':
$ python3.11 -m keyring get testing test
password
$ python3.11 -m keyring del testing test
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/jim/.local/lib/python3.11/site-packages/keyring/__main__.py", line 4, in <module>
cli.main()
File "/home/jim/.local/lib/python3.11/site-packages/keyring/cli.py", line 216, in main
return cli.run(argv)
^^^^^^^^^^^^^
File "/home/jim/.local/lib/python3.11/site-packages/keyring/cli.py", line 120, in run
return method()
^^^^^^^^
File "/home/jim/.local/lib/python3.11/site-packages/keyring/cli.py", line 157, in do_del
delete_password(self.service, self.username)
File "/home/jim/.local/lib/python3.11/site-packages/keyring/core.py", line 73, in delete_password
get_keyring().delete_password(service_name, username)
File "/home/jim/.local/lib/python3.11/site-packages/keyring/backends/chainer.py", line 63, in delete_password
return keyring.delete_password(service, username)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jim/.local/lib/python3.11/site-packages/keyring/backends/kwallet.py", line 150, in delete_password
raise PasswordDeleteError("Password not found")
keyring.errors.PasswordDeleteError: Password not found
Of course I can delete the password by specifying the backend with -b, but I'd prefer not to worry about backends in my programmatic use of python-keyring.
That seems like a bug to me. I see that the chainer's behavior is to suppress NotImplementedError but not other errors from the chained backends. Probably it should also suppress PasswordDeleteError or maybe there should be a separate class of exception for PasswordNotFound so that the chainer can discern between a failure and a non-existent password. Would you be willing to work on a patch?
Describe the bug
Using kdewallet I can see old keyring passwords listed in "Secret Service". New keyring passwords are listed under the "system" passed to set_password. I assume this is because I previously did not have
keyring.backends.kwallet.DBusKeyring
installed.$ python3.11 -m keyring get system username
correctly finds the old passwords.$ python3.11 -m keyring del system username
fails as follows:Expected behavior
I would expect to be able to delete any password that I can read.
Environment
The text was updated successfully, but these errors were encountered: