I have patched /usr/bin/polly so that it prints the currently used keyring backend, and it really uses Gnome keyring now. However, Polly won't start anymore after this change, and dies with a backtrace:
current keyring is:
<keyring.backends.Gnome.Keyring object at 0x7fe9fdc9da10>
Traceback (most recent call last):
File "/usr/bin/polly", line 330, in <module>
account_manager = gui.twitter.account.Manager(NAME, config_path, config_path_lock, setting_factory, proxy_controller, font_scheme, identifier_factory, status_bar)
File "/usr/lib/python2.7/dist-packages/polly/gui/twitter/account.py", line 489, in __init__
subtoken_secret = keyring.get_password(self.name, subtoken)
File "/usr/lib/python2.7/dist-packages/keyring/core.py", line 36, in get_password
return _keyring_backend.get_password(service_name, username)
File "/usr/lib/python2.7/dist-packages/keyring/backends/Gnome.py", line 53, in get_password
items = self._find_passwords(service, username)
File "/usr/lib/python2.7/dist-packages/keyring/backends/Gnome.py", line 30, in _find_passwords
from gi.repository import GnomeKeyring
File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 27, in <module>
from ._gi import _API, Repository
ImportError: cannot import name _API
I guess this is related to the fact that Polly is not yet ported to GObject Introspection and uses modules that are incompatible with GI, but the underlying python-keyring implementation uses introspection. I currently cannot downgrade to a previous version of python-keyring (the only version in Debian testing is 1.6), so I guess, I have to find a different Twitter client :-(
Okay, this did not work every time. Apparently, python-keyring is buggy when it some to determining the default keyring (see https:/ /bitbucket. org/kang/ python- keyring- lib/issue/ 96/default- backend- sort-order- is-not), which resulted in Polly loading secrets sometimes from Gnome keyring, sometimes from the file backend... -.-
A a workaround, I created the file .local/ share/python_ keyring/ keyringrc. cfg with this content:
[backend] backend. Gnome.Keyring
default-keyring = keyring.
I have patched /usr/bin/polly so that it prints the currently used keyring backend, and it really uses Gnome keyring now. However, Polly won't start anymore after this change, and dies with a backtrace:
current keyring is: backends. Gnome.Keyring object at 0x7fe9fdc9da10> account. Manager( NAME, config_path, config_path_lock, setting_factory, proxy_controller, font_scheme, identifier_factory, status_bar) python2. 7/dist- packages/ polly/gui/ twitter/ account. py", line 489, in __init__ get_password( self.name, subtoken) python2. 7/dist- packages/ keyring/ core.py" , line 36, in get_password backend. get_password( service_ name, username) python2. 7/dist- packages/ keyring/ backends/ Gnome.py" , line 53, in get_password passwords( service, username) python2. 7/dist- packages/ keyring/ backends/ Gnome.py" , line 30, in _find_passwords python2. 7/dist- packages/ gi/__init_ _.py", line 27, in <module>
<keyring.
Traceback (most recent call last):
File "/usr/bin/polly", line 330, in <module>
account_manager = gui.twitter.
File "/usr/lib/
subtoken_secret = keyring.
File "/usr/lib/
return _keyring_
File "/usr/lib/
items = self._find_
File "/usr/lib/
from gi.repository import GnomeKeyring
File "/usr/lib/
from ._gi import _API, Repository
ImportError: cannot import name _API
I guess this is related to the fact that Polly is not yet ported to GObject Introspection and uses modules that are incompatible with GI, but the underlying python-keyring implementation uses introspection. I currently cannot downgrade to a previous version of python-keyring (the only version in Debian testing is 1.6), so I guess, I have to find a different Twitter client :-(