-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
test failures in libsecret (and others) #581
Comments
Your output reveals two failure modes. The first is with The other errors appear to be due to libsecret, where a similar issue is being discussed in #561. Until that issue is addressed, you may want to consider skipping the libsecret tests with |
FTR: Just tested 23.7.0 + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-23.7.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-23.7.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/keyring-23.7.0, configfile: pytest.ini
plugins: cov-3.0.0, flake8-1.1.1
collected 93 items
keyring/core.py . [ 1%]
keyring/credentials.py . [ 2%]
keyring/backends/chainer.py . [ 3%]
keyring/backends/fail.py . [ 4%]
keyring/backends/null.py . [ 5%]
keyring/util/__init__.py . [ 6%]
keyring/util/properties.py .. [ 8%]
tests/test_core.py . [ 9%]
tests/test_errors.py . [ 10%]
tests/test_integration.py ... [ 13%]
tests/test_multiprocess.py xx [ 16%]
tests/test_packaging.py .. [ 18%]
tests/backends/test_SecretService.py sssssssssss. [ 31%]
tests/backends/test_Windows.py ssssssssssssss [ 46%]
tests/backends/test_chainer.py .. [ 48%]
tests/backends/test_kwallet.py ssssssssssssssssssssss [ 72%]
tests/backends/test_libsecret.py FFFFF.FFFF.. [ 84%]
tests/backends/test_macOS.py ssssssssssss [ 97%]
tests/util/test_platform.py .s [100%]
================================================================================= FAILURES =================================================================================
________________________________________________________________ TestLibSecretKeyring.test_password_set_get ________________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f59f2c1c790>, service = 'GvZSbUvLruIwV8GbUcoG', username = '5M1vhtYvlPN9VSvlCeIp'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:62: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f59f2dd5fd0>
def test_password_set_get(self):
password = random_string(20)
username = random_string(20)
service = random_string(20)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f59f2c1c790>, service = 'GvZSbUvLruIwV8GbUcoG', username = '5M1vhtYvlPN9VSvlCeIp'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
try:
items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked('Failed to unlock the item!') from error
E keyring.errors.KeyringLocked: Failed to unlock the item!
keyring/backends/libsecret.py:68: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
________________________________________________________________ TestLibSecretKeyring.test_difficult_chars _________________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f59f23d11c0>, service = ',"~!?>:"\')(\x0b;*,!-\x0b/}', username = "*(\x0c\t&_+\x0b%\n\t{=/>'%\r\n\t"
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:62: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f59f2dd56a0>
def test_difficult_chars(self):
password = random_string(20, self.DIFFICULT_CHARS)
username = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f59f23d11c0>, service = ',"~!?>:"\')(\x0b;*,!-\x0b/}', username = "*(\x0c\t&_+\x0b%\n\t{=/>'%\r\n\t"
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
try:
items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked('Failed to unlock the item!') from error
E keyring.errors.KeyringLocked: Failed to unlock the item!
keyring/backends/libsecret.py:68: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_________________________________________________________________ TestLibSecretKeyring.test_delete_present _________________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f59f23d19a0>, service = '$\\\x0b;=#;[\\+[/|(,]\x0b&&~', username = ",{-\x0b\x0b}/]!\x0c,`. =#<' #"
password = '~{-_@\x0b:$%"||(\'\\{`|#('
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
label = "Password for '{}' on '{}'".format(username, service)
try:
> stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:88: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f59f2dd5a00>
def test_delete_present(self):
password = random_string(20, self.DIFFICULT_CHARS)
username = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
> self.keyring.set_password(service, username, password)
keyring/testing/backend.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f59f23d19a0>, service = '$\\\x0b;=#;[\\+[/|(,]\x0b&&~', username = ",{-\x0b\x0b}/]!\x0c,`. =#<' #"
password = '~{-_@\x0b:$%"||(\'\\{`|#('
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
label = "Password for '{}' on '{}'".format(username, service)
try:
stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('secret-error')
if error.matches(quark, Secret.Error.IS_LOCKED):
raise KeyringLocked("Failed to unlock the collection!") from error
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked("Failed to unlock the collection!") from error
E keyring.errors.KeyringLocked: Failed to unlock the collection!
keyring/backends/libsecret.py:97: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_______________________________________________________________ TestLibSecretKeyring.test_delete_not_present _______________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f59f2db3f70>, service = "#='[#|\x0c{{'#:[\x0c>.+*}\t", username = '&[&{\x0b\r,:!`#%,[$$#)$#'
def delete_password(self, service, username):
"""Delete the stored password (only the first one)"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:110: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f59f2dd5be0>
def test_delete_not_present(self):
username = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
with pytest.raises(errors.PasswordDeleteError):
> self.keyring.delete_password(service, username)
keyring/testing/backend.py:92:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f59f2db3f70>, service = "#='[#|\x0c{{'#:[\x0c>.+*}\t", username = '&[&{\x0b\r,:!`#%,[$$#)$#'
def delete_password(self, service, username):
"""Delete the stored password (only the first one)"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
try:
items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked('Failed to unlock the item!') from error
E keyring.errors.KeyringLocked: Failed to unlock the item!
keyring/backends/libsecret.py:116: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
______________________________________________________________ TestLibSecretKeyring.test_delete_one_in_group _______________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f59f23d1790>, service = '_@{?[\r+"- ** !{~`\\|\x0c', username = ' +\r|! \\^!&{`\'}"\\)$*+'
password = '$%/=]\x0c\t=("\x0b]?$:?-$~}'
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
label = "Password for '{}' on '{}'".format(username, service)
try:
> stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:88: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f59f2e17040>
def test_delete_one_in_group(self):
username1 = random_string(20, self.DIFFICULT_CHARS)
username2 = random_string(20, self.DIFFICULT_CHARS)
password = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
> self.keyring.set_password(service, username1, password)
keyring/testing/backend.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f59f23d1790>, service = '_@{?[\r+"- ** !{~`\\|\x0c', username = ' +\r|! \\^!&{`\'}"\\)$*+'
password = '$%/=]\x0c\t=("\x0b]?$:?-$~}'
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
label = "Password for '{}' on '{}'".format(username, service)
try:
stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('secret-error')
if error.matches(quark, Secret.Error.IS_LOCKED):
raise KeyringLocked("Failed to unlock the collection!") from error
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked("Failed to unlock the collection!") from error
E keyring.errors.KeyringLocked: Failed to unlock the collection!
keyring/backends/libsecret.py:97: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_________________________________________________________________ TestLibSecretKeyring.test_unicode_chars __________________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f59f23d97f0>, service = 'ццטснщъאтכאעעίЖвиоאη', username = 'цуъэзמуφנךγдэюбъרκרи'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:62: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f59f2db5e20>
def test_unicode_chars(self):
password = random_string(20, UNICODE_CHARS)
username = random_string(20, UNICODE_CHARS)
service = random_string(20, UNICODE_CHARS)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:111:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f59f23d97f0>, service = 'ццטснщъאтכאעעίЖвиоאη', username = 'цуъэзמуφנךγдэюбъרκרи'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
try:
items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked('Failed to unlock the item!') from error
E keyring.errors.KeyringLocked: Failed to unlock the item!
keyring/backends/libsecret.py:68: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
____________________________________________________________ TestLibSecretKeyring.test_unicode_and_ascii_chars _____________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f59f23d60a0>, service = 'bD=F=р>>DλbbцAMλίλце', username = '+е.*ίλр*.рίבb9(bZZF='
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:62: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f59f2dc0430>
def test_unicode_and_ascii_chars(self):
source = (
random_string(10, UNICODE_CHARS)
+ random_string(10)
+ random_string(10, self.DIFFICULT_CHARS)
)
password = random_string(20, source)
username = random_string(20, source)
service = random_string(20, source)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:122:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f59f23d60a0>, service = 'bD=F=р>>DλbbцAMλίλце', username = '+е.*ίλр*.рίבb9(bZZF='
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
try:
items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked('Failed to unlock the item!') from error
E keyring.errors.KeyringLocked: Failed to unlock the item!
keyring/backends/libsecret.py:68: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_________________________________________________________________ TestLibSecretKeyring.test_different_user _________________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f59f2db5ca0>, service = 'service1', username = 'user1', password = 'password1'
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
label = "Password for '{}' on '{}'".format(username, service)
try:
> stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:88: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f59f2dc0070>
def test_different_user(self):
"""
Issue #47 reports that WinVault isn't storing passwords for
multiple users. This test exercises that test for each of the
backends.
"""
keyring = self.keyring
> self.set_password('service1', 'user1', 'password1')
keyring/testing/backend.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:51: in set_password
self.keyring.set_password(service, username, password)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f59f2db5ca0>, service = 'service1', username = 'user1', password = 'password1'
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = {
"application": self.appid,
"service": service,
"username": username,
}
label = "Password for '{}' on '{}'".format(username, service)
try:
stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('secret-error')
if error.matches(quark, Secret.Error.IS_LOCKED):
raise KeyringLocked("Failed to unlock the collection!") from error
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked("Failed to unlock the collection!") from error
E keyring.errors.KeyringLocked: Failed to unlock the collection!
keyring/backends/libsecret.py:97: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
___________________________________________________________________ TestLibSecretKeyring.test_credential ___________________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f59f23b6550>, service = 'service', username = None
def get_credential(self, service, username):
"""Get the first username and password for a service.
Return a Credential instance
The username can be omitted, but if there is one, it will use get_password
and return a SimpleCredential containing the username and password
Otherwise, it will return the first username and password combo that it finds.
"""
query = {"service": service}
if username:
query["username"] = username
try:
> items = Secret.password_search_sync(
self.schema, query, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:143: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f59f2dc0940>
def test_credential(self):
keyring = self.keyring
> cred = keyring.get_credential('service', None)
keyring/testing/backend.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f59f23b6550>, service = 'service', username = None
def get_credential(self, service, username):
"""Get the first username and password for a service.
Return a Credential instance
The username can be omitted, but if there is one, it will use get_password
and return a SimpleCredential containing the username and password
Otherwise, it will return the first username and password combo that it finds.
"""
query = {"service": service}
if username:
query["username"] = username
try:
items = Secret.password_search_sync(
self.schema, query, Secret.SearchFlags.UNLOCK, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked('Failed to unlock the item!') from error
E keyring.errors.KeyringLocked: Failed to unlock the item!
keyring/backends/libsecret.py:149: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
========================================================================= short test summary info ==========================================================================
SKIPPED [1] keyring/testing/backend.py:68: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:74: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:80: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:88: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:94: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:104: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:107: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:113: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:124: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:139: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:161: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:68: Needs Windows
SKIPPED [1] keyring/testing/backend.py:74: Needs Windows
SKIPPED [1] keyring/testing/backend.py:80: Needs Windows
SKIPPED [1] keyring/testing/backend.py:88: Needs Windows
SKIPPED [1] keyring/testing/backend.py:94: Needs Windows
SKIPPED [1] keyring/testing/backend.py:104: Needs Windows
SKIPPED [1] keyring/testing/backend.py:107: Needs Windows
SKIPPED [1] keyring/testing/backend.py:113: Needs Windows
SKIPPED [1] keyring/testing/backend.py:124: Needs Windows
SKIPPED [1] keyring/testing/backend.py:139: Needs Windows
SKIPPED [1] keyring/testing/backend.py:161: Needs Windows
SKIPPED [1] tests/backends/test_Windows.py:50: Needs Windows
SKIPPED [1] tests/backends/test_Windows.py:53: Needs Windows
SKIPPED [1] tests/backends/test_Windows.py:65: condition: sys.platform != "win32"
SKIPPED [2] keyring/testing/backend.py:68: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:74: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:80: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:88: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:94: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:104: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:107: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:113: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:124: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:139: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:161: KWallet5 unavailable
SKIPPED [1] keyring/testing/backend.py:68: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:74: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:80: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:88: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:94: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:104: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:107: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:113: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:124: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:139: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:161: macOS backend not viable
SKIPPED [1] tests/backends/test_macOS.py:16: macOS backend not viable
SKIPPED [1] tests/util/test_platform.py:12: condition: platform.system() != "Windows"
XFAIL tests/test_multiprocess.py::test_multiprocess_get
#410: keyring discovery fails intermittently
XFAIL tests/test_multiprocess.py::test_multiprocess_get_after_native_get
#410: keyring discovery fails intermittently
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_password_set_get - keyring.errors.KeyringLocked: Failed to unlock the item!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_difficult_chars - keyring.errors.KeyringLocked: Failed to unlock the item!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_delete_present - keyring.errors.KeyringLocked: Failed to unlock the collection!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_delete_not_present - keyring.errors.KeyringLocked: Failed to unlock the item!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_delete_one_in_group - keyring.errors.KeyringLocked: Failed to unlock the collection!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_unicode_chars - keyring.errors.KeyringLocked: Failed to unlock the item!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_unicode_and_ascii_chars - keyring.errors.KeyringLocked: Failed to unlock the item!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_different_user - keyring.errors.KeyringLocked: Failed to unlock the collection!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_credential - keyring.errors.KeyringLocked: Failed to unlock the item!
=========================================================== 9 failed, 22 passed, 60 skipped, 2 xfailed in 1.07s ============================================================ |
Please try running tests inside a |
Just checked 23.8.1 and I see some new units failing and some errors + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-23.8.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-23.8.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/keyring-23.8.1, configfile: pytest.ini
plugins: cov-3.0.0, flake8-1.1.1
collected 99 items
keyring/backend.py . [ 1%]
keyring/core.py . [ 2%]
keyring/credentials.py . [ 3%]
keyring/backends/chainer.py . [ 4%]
keyring/backends/fail.py . [ 5%]
keyring/backends/null.py . [ 6%]
keyring/util/__init__.py . [ 7%]
keyring/util/properties.py .. [ 9%]
tests/test_core.py . [ 10%]
tests/test_errors.py . [ 11%]
tests/test_integration.py ... [ 14%]
tests/test_multiprocess.py xx [ 16%]
tests/test_packaging.py .. [ 18%]
tests/backends/test_SecretService.py ssssssssssss. [ 31%]
tests/backends/test_Windows.py sssssssssssssss [ 46%]
tests/backends/test_chainer.py .. [ 48%]
tests/backends/test_kwallet.py ssssssssssssssssssssssss [ 72%]
tests/backends/test_libsecret.py EEEEEEEEEEEE. [ 85%]
tests/backends/test_macOS.py ssssssssssss [ 97%]
tests/util/test_platform.py .s [100%]
================================================================================== ERRORS ==================================================================================
_______________________________________________________ ERROR at setup of TestLibSecretKeyring.test_password_set_get _______________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9aedf0>, request = <SubRequest '_init_properties' for <Function test_password_set_get>>
@pytest.fixture(autouse=True)
def _init_properties(self, request):
> self.keyring = self.init_keyring()
keyring/testing/backend.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9aedf0>
def init_keyring(self):
print(
"Testing LibSecretKeyring; the following "
"password prompts are for this keyring"
)
keyring = libsecret.Keyring()
> keyring.collection = 'session'
E AttributeError: can't set attribute
tests/backends/test_libsecret.py:21: AttributeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_______________________________________________________ ERROR at setup of TestLibSecretKeyring.test_difficult_chars ________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6cd0>, request = <SubRequest '_init_properties' for <Function test_difficult_chars>>
@pytest.fixture(autouse=True)
def _init_properties(self, request):
> self.keyring = self.init_keyring()
keyring/testing/backend.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6cd0>
def init_keyring(self):
print(
"Testing LibSecretKeyring; the following "
"password prompts are for this keyring"
)
keyring = libsecret.Keyring()
> keyring.collection = 'session'
E AttributeError: can't set attribute
tests/backends/test_libsecret.py:21: AttributeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
________________________________________________________ ERROR at setup of TestLibSecretKeyring.test_delete_present ________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6070>, request = <SubRequest '_init_properties' for <Function test_delete_present>>
@pytest.fixture(autouse=True)
def _init_properties(self, request):
> self.keyring = self.init_keyring()
keyring/testing/backend.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6070>
def init_keyring(self):
print(
"Testing LibSecretKeyring; the following "
"password prompts are for this keyring"
)
keyring = libsecret.Keyring()
> keyring.collection = 'session'
E AttributeError: can't set attribute
tests/backends/test_libsecret.py:21: AttributeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
______________________________________________________ ERROR at setup of TestLibSecretKeyring.test_delete_not_present ______________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6460>, request = <SubRequest '_init_properties' for <Function test_delete_not_present>>
@pytest.fixture(autouse=True)
def _init_properties(self, request):
> self.keyring = self.init_keyring()
keyring/testing/backend.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6460>
def init_keyring(self):
print(
"Testing LibSecretKeyring; the following "
"password prompts are for this keyring"
)
keyring = libsecret.Keyring()
> keyring.collection = 'session'
E AttributeError: can't set attribute
tests/backends/test_libsecret.py:21: AttributeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_____________________________________________________ ERROR at setup of TestLibSecretKeyring.test_delete_one_in_group ______________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6160>, request = <SubRequest '_init_properties' for <Function test_delete_one_in_group>>
@pytest.fixture(autouse=True)
def _init_properties(self, request):
> self.keyring = self.init_keyring()
keyring/testing/backend.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6160>
def init_keyring(self):
print(
"Testing LibSecretKeyring; the following "
"password prompts are for this keyring"
)
keyring = libsecret.Keyring()
> keyring.collection = 'session'
E AttributeError: can't set attribute
tests/backends/test_libsecret.py:21: AttributeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
________________________________________________________ ERROR at setup of TestLibSecretKeyring.test_name_property _________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6040>, request = <SubRequest '_init_properties' for <Function test_name_property>>
@pytest.fixture(autouse=True)
def _init_properties(self, request):
> self.keyring = self.init_keyring()
keyring/testing/backend.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6040>
def init_keyring(self):
print(
"Testing LibSecretKeyring; the following "
"password prompts are for this keyring"
)
keyring = libsecret.Keyring()
> keyring.collection = 'session'
E AttributeError: can't set attribute
tests/backends/test_libsecret.py:21: AttributeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
________________________________________________________ ERROR at setup of TestLibSecretKeyring.test_unicode_chars _________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6580>, request = <SubRequest '_init_properties' for <Function test_unicode_chars>>
@pytest.fixture(autouse=True)
def _init_properties(self, request):
> self.keyring = self.init_keyring()
keyring/testing/backend.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6580>
def init_keyring(self):
print(
"Testing LibSecretKeyring; the following "
"password prompts are for this keyring"
)
keyring = libsecret.Keyring()
> keyring.collection = 'session'
E AttributeError: can't set attribute
tests/backends/test_libsecret.py:21: AttributeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
___________________________________________________ ERROR at setup of TestLibSecretKeyring.test_unicode_and_ascii_chars ____________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6ac0>, request = <SubRequest '_init_properties' for <Function test_unicode_and_ascii_chars>>
@pytest.fixture(autouse=True)
def _init_properties(self, request):
> self.keyring = self.init_keyring()
keyring/testing/backend.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6ac0>
def init_keyring(self):
print(
"Testing LibSecretKeyring; the following "
"password prompts are for this keyring"
)
keyring = libsecret.Keyring()
> keyring.collection = 'session'
E AttributeError: can't set attribute
tests/backends/test_libsecret.py:21: AttributeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
________________________________________________________ ERROR at setup of TestLibSecretKeyring.test_different_user ________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6af0>, request = <SubRequest '_init_properties' for <Function test_different_user>>
@pytest.fixture(autouse=True)
def _init_properties(self, request):
> self.keyring = self.init_keyring()
keyring/testing/backend.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6af0>
def init_keyring(self):
print(
"Testing LibSecretKeyring; the following "
"password prompts are for this keyring"
)
keyring = libsecret.Keyring()
> keyring.collection = 'session'
E AttributeError: can't set attribute
tests/backends/test_libsecret.py:21: AttributeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
__________________________________________________________ ERROR at setup of TestLibSecretKeyring.test_credential __________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a61f0>, request = <SubRequest '_init_properties' for <Function test_credential>>
@pytest.fixture(autouse=True)
def _init_properties(self, request):
> self.keyring = self.init_keyring()
keyring/testing/backend.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a61f0>
def init_keyring(self):
print(
"Testing LibSecretKeyring; the following "
"password prompts are for this keyring"
)
keyring = libsecret.Keyring()
> keyring.collection = 'session'
E AttributeError: can't set attribute
tests/backends/test_libsecret.py:21: AttributeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
________________________________________________________ ERROR at setup of TestLibSecretKeyring.test_set_properties ________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6700>, request = <SubRequest '_init_properties' for <Function test_set_properties>>
@pytest.fixture(autouse=True)
def _init_properties(self, request):
> self.keyring = self.init_keyring()
keyring/testing/backend.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a9a6700>
def init_keyring(self):
print(
"Testing LibSecretKeyring; the following "
"password prompts are for this keyring"
)
keyring = libsecret.Keyring()
> keyring.collection = 'session'
E AttributeError: can't set attribute
tests/backends/test_libsecret.py:21: AttributeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_____________________________________________________ ERROR at setup of TestLibSecretKeyring.test_new_with_properties ______________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a988dc0>, request = <SubRequest '_init_properties' for <Function test_new_with_properties>>
@pytest.fixture(autouse=True)
def _init_properties(self, request):
> self.keyring = self.init_keyring()
keyring/testing/backend.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_libsecret.TestLibSecretKeyring object at 0x7fd52a988dc0>
def init_keyring(self):
print(
"Testing LibSecretKeyring; the following "
"password prompts are for this keyring"
)
keyring = libsecret.Keyring()
> keyring.collection = 'session'
E AttributeError: can't set attribute
tests/backends/test_libsecret.py:21: AttributeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
========================================================================= short test summary info ==========================================================================
SKIPPED [1] keyring/testing/backend.py:68: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:74: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:80: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:88: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:94: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:104: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:107: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:113: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:124: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:139: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:161: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:167: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:68: Needs Windows
SKIPPED [1] keyring/testing/backend.py:74: Needs Windows
SKIPPED [1] keyring/testing/backend.py:80: Needs Windows
SKIPPED [1] keyring/testing/backend.py:88: Needs Windows
SKIPPED [1] keyring/testing/backend.py:94: Needs Windows
SKIPPED [1] keyring/testing/backend.py:104: Needs Windows
SKIPPED [1] keyring/testing/backend.py:107: Needs Windows
SKIPPED [1] keyring/testing/backend.py:113: Needs Windows
SKIPPED [1] keyring/testing/backend.py:124: Needs Windows
SKIPPED [1] keyring/testing/backend.py:139: Needs Windows
SKIPPED [1] keyring/testing/backend.py:161: Needs Windows
SKIPPED [1] keyring/testing/backend.py:167: Needs Windows
SKIPPED [1] tests/backends/test_Windows.py:50: Needs Windows
SKIPPED [1] tests/backends/test_Windows.py:53: Needs Windows
SKIPPED [1] tests/backends/test_Windows.py:65: condition: sys.platform != "win32"
SKIPPED [2] keyring/testing/backend.py:68: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:74: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:80: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:88: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:94: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:104: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:107: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:113: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:124: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:139: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:161: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:167: KWallet5 unavailable
SKIPPED [1] keyring/testing/backend.py:68: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:74: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:80: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:88: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:94: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:104: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:107: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:113: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:124: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:139: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:161: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:167: macOS backend not viable
SKIPPED [1] tests/util/test_platform.py:12: condition: platform.system() != "Windows"
XFAIL tests/test_multiprocess.py::test_multiprocess_get
#410: keyring discovery fails intermittently
XFAIL tests/test_multiprocess.py::test_multiprocess_get_after_native_get
#410: keyring discovery fails intermittently
ERROR tests/backends/test_libsecret.py::TestLibSecretKeyring::test_password_set_get - AttributeError: can't set attribute
ERROR tests/backends/test_libsecret.py::TestLibSecretKeyring::test_difficult_chars - AttributeError: can't set attribute
ERROR tests/backends/test_libsecret.py::TestLibSecretKeyring::test_delete_present - AttributeError: can't set attribute
ERROR tests/backends/test_libsecret.py::TestLibSecretKeyring::test_delete_not_present - AttributeError: can't set attribute
ERROR tests/backends/test_libsecret.py::TestLibSecretKeyring::test_delete_one_in_group - AttributeError: can't set attribute
ERROR tests/backends/test_libsecret.py::TestLibSecretKeyring::test_name_property - AttributeError: can't set attribute
ERROR tests/backends/test_libsecret.py::TestLibSecretKeyring::test_unicode_chars - AttributeError: can't set attribute
ERROR tests/backends/test_libsecret.py::TestLibSecretKeyring::test_unicode_and_ascii_chars - AttributeError: can't set attribute
ERROR tests/backends/test_libsecret.py::TestLibSecretKeyring::test_different_user - AttributeError: can't set attribute
ERROR tests/backends/test_libsecret.py::TestLibSecretKeyring::test_credential - AttributeError: can't set attribute
ERROR tests/backends/test_libsecret.py::TestLibSecretKeyring::test_set_properties - AttributeError: can't set attribute
ERROR tests/backends/test_libsecret.py::TestLibSecretKeyring::test_new_with_properties - AttributeError: can't set attribute
=========================================================== 21 passed, 64 skipped, 2 xfailed, 12 errors in 1.01s =========================================================== |
Just tested 23.8.2 + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-23.8.2-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-23.8.2-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/keyring-23.8.2, configfile: pytest.ini
plugins: cov-3.0.0, flake8-1.1.1
collected 99 items
keyring/backend.py . [ 1%]
keyring/core.py . [ 2%]
keyring/credentials.py . [ 3%]
keyring/backends/chainer.py . [ 4%]
keyring/backends/fail.py . [ 5%]
keyring/backends/null.py . [ 6%]
keyring/util/__init__.py . [ 7%]
keyring/util/properties.py .. [ 9%]
tests/test_core.py . [ 10%]
tests/test_errors.py . [ 11%]
tests/test_integration.py ... [ 14%]
tests/test_multiprocess.py xx [ 16%]
tests/test_packaging.py .. [ 18%]
tests/backends/test_SecretService.py ssssssssssss. [ 31%]
tests/backends/test_Windows.py sssssssssssssss [ 46%]
tests/backends/test_chainer.py .. [ 48%]
tests/backends/test_kwallet.py ssssssssssssssssssssssss [ 72%]
tests/backends/test_libsecret.py FFFFF.FFFF... [ 85%]
tests/backends/test_macOS.py ssssssssssss [ 97%]
tests/util/test_platform.py .s [100%]
================================================================================= FAILURES =================================================================================
________________________________________________________________ TestLibSecretKeyring.test_password_set_get ________________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f741251dc70>, service = 'aDfLL4skgnVsNba3o1dq', username = 'Ucir4NRV035SL2GQj4BF'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:64: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f741255d5e0>
def test_password_set_get(self):
password = random_string(20)
username = random_string(20)
service = random_string(20)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f741251dc70>, service = 'aDfLL4skgnVsNba3o1dq', username = 'Ucir4NRV035SL2GQj4BF'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked('Failed to unlock the item!') from error
E keyring.errors.KeyringLocked: Failed to unlock the item!
keyring/backends/libsecret.py:70: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
________________________________________________________________ TestLibSecretKeyring.test_difficult_chars _________________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f741239a970>, service = '&] -}<@.#}>"\\#(]\'\x0b&`', username = '|@}>,<{=&;+]\n=^]%[@='
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:64: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f741255da30>
def test_difficult_chars(self):
password = random_string(20, self.DIFFICULT_CHARS)
username = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f741239a970>, service = '&] -}<@.#}>"\\#(]\'\x0b&`', username = '|@}>,<{=&;+]\n=^]%[@='
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked('Failed to unlock the item!') from error
E keyring.errors.KeyringLocked: Failed to unlock the item!
keyring/backends/libsecret.py:70: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_________________________________________________________________ TestLibSecretKeyring.test_delete_present _________________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f74123ffd60>, service = '|{]>`\n}\n)\n~#;,:\t}\x0c` ', username = '*\\@(\x0b/\n|$\n< />%<;^:<'
password = ' \x0c\x0b|$$\\!#;*\x0c (>}*\r/ '
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = self._query(service, username, application=self.appid)
label = "Password for '{}' on '{}'".format(username, service)
try:
> stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:86: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f74124a9220>
def test_delete_present(self):
password = random_string(20, self.DIFFICULT_CHARS)
username = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
> self.keyring.set_password(service, username, password)
keyring/testing/backend.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f74123ffd60>, service = '|{]>`\n}\n)\n~#;,:\t}\x0c` ', username = '*\\@(\x0b/\n|$\n< />%<;^:<'
password = ' \x0c\x0b|$$\\!#;*\x0c (>}*\r/ '
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = self._query(service, username, application=self.appid)
label = "Password for '{}' on '{}'".format(username, service)
try:
stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('secret-error')
if error.matches(quark, Secret.Error.IS_LOCKED):
raise KeyringLocked("Failed to unlock the collection!") from error
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked("Failed to unlock the collection!") from error
E keyring.errors.KeyringLocked: Failed to unlock the collection!
keyring/backends/libsecret.py:95: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_______________________________________________________________ TestLibSecretKeyring.test_delete_not_present _______________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f741253cdc0>, service = '$`\x0b`%"`<?\t^{_<+=+(\x0c?', username = ":\r?\t'[/ >[#:'&+%_=-|"
def delete_password(self, service, username):
"""Delete the stored password (only the first one)"""
attributes = self._query(service, username, application=self.appid)
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:104: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f74124a95b0>
def test_delete_not_present(self):
username = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
with pytest.raises(errors.PasswordDeleteError):
> self.keyring.delete_password(service, username)
keyring/testing/backend.py:92:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f741253cdc0>, service = '$`\x0b`%"`<?\t^{_<+=+(\x0c?', username = ":\r?\t'[/ >[#:'&+%_=-|"
def delete_password(self, service, username):
"""Delete the stored password (only the first one)"""
attributes = self._query(service, username, application=self.appid)
try:
items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked('Failed to unlock the item!') from error
E keyring.errors.KeyringLocked: Failed to unlock the item!
keyring/backends/libsecret.py:110: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
______________________________________________________________ TestLibSecretKeyring.test_delete_one_in_group _______________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f741181a3a0>, service = "{.,^'<'?|,| ,](?\r}]:", username = '?>$_#]`\x0c?{]\x0b:$%,-?]\r'
password = '!-{&\\{_\x0c?!|\\\r"*-*-?%'
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = self._query(service, username, application=self.appid)
label = "Password for '{}' on '{}'".format(username, service)
try:
> stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:86: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f74124a9be0>
def test_delete_one_in_group(self):
username1 = random_string(20, self.DIFFICULT_CHARS)
username2 = random_string(20, self.DIFFICULT_CHARS)
password = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
> self.keyring.set_password(service, username1, password)
keyring/testing/backend.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f741181a3a0>, service = "{.,^'<'?|,| ,](?\r}]:", username = '?>$_#]`\x0c?{]\x0b:$%,-?]\r'
password = '!-{&\\{_\x0c?!|\\\r"*-*-?%'
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = self._query(service, username, application=self.appid)
label = "Password for '{}' on '{}'".format(username, service)
try:
stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('secret-error')
if error.matches(quark, Secret.Error.IS_LOCKED):
raise KeyringLocked("Failed to unlock the collection!") from error
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked("Failed to unlock the collection!") from error
E keyring.errors.KeyringLocked: Failed to unlock the collection!
keyring/backends/libsecret.py:95: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_________________________________________________________________ TestLibSecretKeyring.test_unicode_chars __________________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f741183c520>, service = 'оבכτеןрםоηсммץטиסСсЖ', username = 'εмнкрщάъωщаβίцуαутάъ'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:64: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f74124a9b20>
def test_unicode_chars(self):
password = random_string(20, UNICODE_CHARS)
username = random_string(20, UNICODE_CHARS)
service = random_string(20, UNICODE_CHARS)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:111:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f741183c520>, service = 'оבכτеןрםоηсммץטиסСсЖ', username = 'εмнкрщάъωщаβίцуαутάъ'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked('Failed to unlock the item!') from error
E keyring.errors.KeyringLocked: Failed to unlock the item!
keyring/backends/libsecret.py:70: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
____________________________________________________________ TestLibSecretKeyring.test_unicode_and_ascii_chars _____________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f7411805340>, service = 'roоγL</эxoγL`оUrί,н\t', username = 'эW.WUgrFhί<hоFн`оr</'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:64: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f74124a9c10>
def test_unicode_and_ascii_chars(self):
source = (
random_string(10, UNICODE_CHARS)
+ random_string(10)
+ random_string(10, self.DIFFICULT_CHARS)
)
password = random_string(20, source)
username = random_string(20, source)
service = random_string(20, source)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:122:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f7411805340>, service = 'roоγL</эxoγL`оUrί,н\t', username = 'эW.WUgrFhί<hоFн`оr</'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked('Failed to unlock the item!') from error
E keyring.errors.KeyringLocked: Failed to unlock the item!
keyring/backends/libsecret.py:70: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_________________________________________________________________ TestLibSecretKeyring.test_different_user _________________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f7411840070>, service = 'service1', username = 'user1', password = 'password1'
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = self._query(service, username, application=self.appid)
label = "Password for '{}' on '{}'".format(username, service)
try:
> stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:86: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f74124a9eb0>
def test_different_user(self):
"""
Issue #47 reports that WinVault isn't storing passwords for
multiple users. This test exercises that test for each of the
backends.
"""
keyring = self.keyring
> self.set_password('service1', 'user1', 'password1')
keyring/testing/backend.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:51: in set_password
self.keyring.set_password(service, username, password)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f7411840070>, service = 'service1', username = 'user1', password = 'password1'
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = self._query(service, username, application=self.appid)
label = "Password for '{}' on '{}'".format(username, service)
try:
stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('secret-error')
if error.matches(quark, Secret.Error.IS_LOCKED):
raise KeyringLocked("Failed to unlock the collection!") from error
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked("Failed to unlock the collection!") from error
E keyring.errors.KeyringLocked: Failed to unlock the collection!
keyring/backends/libsecret.py:95: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
___________________________________________________________________ TestLibSecretKeyring.test_credential ___________________________________________________________________
self = <keyring.backends.libsecret.Keyring object at 0x7f7411805ca0>, service = 'service', username = None
def get_credential(self, service, username):
"""Get the first username and password for a service.
Return a Credential instance
The username can be omitted, but if there is one, it will use get_password
and return a SimpleCredential containing the username and password
Otherwise, it will return the first username and password combo that it finds.
"""
query = self._query(service, username)
try:
> items = Secret.password_search_sync(
self.schema, query, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
keyring/backends/libsecret.py:135: Error
The above exception was the direct cause of the following exception:
self = <test_libsecret.TestLibSecretKeyring object at 0x7f74124a9580>
def test_credential(self):
keyring = self.keyring
> cred = keyring.get_credential('service', None)
keyring/testing/backend.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f7411805ca0>, service = 'service', username = None
def get_credential(self, service, username):
"""Get the first username and password for a service.
Return a Credential instance
The username can be omitted, but if there is one, it will use get_password
and return a SimpleCredential containing the username and password
Otherwise, it will return the first username and password combo that it finds.
"""
query = self._query(service, username)
try:
items = Secret.password_search_sync(
self.schema, query, Secret.SearchFlags.UNLOCK, None
)
except GLib.Error as error:
quark = GLib.quark_try_string('g-io-error-quark')
if error.matches(quark, Gio.IOErrorEnum.FAILED):
> raise KeyringLocked('Failed to unlock the item!') from error
E keyring.errors.KeyringLocked: Failed to unlock the item!
keyring/backends/libsecret.py:141: KeyringLocked
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
========================================================================= short test summary info ==========================================================================
SKIPPED [1] keyring/testing/backend.py:68: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:74: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:80: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:88: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:94: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:104: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:107: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:113: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:124: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:139: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:161: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:167: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:68: Needs Windows
SKIPPED [1] keyring/testing/backend.py:74: Needs Windows
SKIPPED [1] keyring/testing/backend.py:80: Needs Windows
SKIPPED [1] keyring/testing/backend.py:88: Needs Windows
SKIPPED [1] keyring/testing/backend.py:94: Needs Windows
SKIPPED [1] keyring/testing/backend.py:104: Needs Windows
SKIPPED [1] keyring/testing/backend.py:107: Needs Windows
SKIPPED [1] keyring/testing/backend.py:113: Needs Windows
SKIPPED [1] keyring/testing/backend.py:124: Needs Windows
SKIPPED [1] keyring/testing/backend.py:139: Needs Windows
SKIPPED [1] keyring/testing/backend.py:161: Needs Windows
SKIPPED [1] keyring/testing/backend.py:167: Needs Windows
SKIPPED [1] tests/backends/test_Windows.py:50: Needs Windows
SKIPPED [1] tests/backends/test_Windows.py:53: Needs Windows
SKIPPED [1] tests/backends/test_Windows.py:65: condition: sys.platform != "win32"
SKIPPED [2] keyring/testing/backend.py:68: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:74: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:80: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:88: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:94: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:104: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:107: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:113: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:124: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:139: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:161: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:167: KWallet5 unavailable
SKIPPED [1] keyring/testing/backend.py:68: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:74: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:80: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:88: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:94: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:104: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:107: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:113: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:124: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:139: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:161: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:167: macOS backend not viable
SKIPPED [1] tests/util/test_platform.py:12: condition: platform.system() != "Windows"
XFAIL tests/test_multiprocess.py::test_multiprocess_get
#410: keyring discovery fails intermittently
XFAIL tests/test_multiprocess.py::test_multiprocess_get_after_native_get
#410: keyring discovery fails intermittently
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_password_set_get - keyring.errors.KeyringLocked: Failed to unlock the item!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_difficult_chars - keyring.errors.KeyringLocked: Failed to unlock the item!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_delete_present - keyring.errors.KeyringLocked: Failed to unlock the collection!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_delete_not_present - keyring.errors.KeyringLocked: Failed to unlock the item!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_delete_one_in_group - keyring.errors.KeyringLocked: Failed to unlock the collection!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_unicode_chars - keyring.errors.KeyringLocked: Failed to unlock the item!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_unicode_and_ascii_chars - keyring.errors.KeyringLocked: Failed to unlock the item!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_different_user - keyring.errors.KeyringLocked: Failed to unlock the collection!
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_credential - keyring.errors.KeyringLocked: Failed to unlock the item!
=========================================================== 9 failed, 24 passed, 64 skipped, 2 xfailed in 1.05s ============================================================ |
Have you (@kloczek) yet had a chance to try this recommendation? |
Sorry .. almost forgot about that ticket 😋 + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-23.9.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-23.9.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ dbus-run-session /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/keyring-23.9.0, configfile: pytest.ini
plugins: cov-3.0.0, flake8-1.1.1
collected 99 items
keyring/_properties_compat.py .. [ 2%]
keyring/backend.py . [ 3%]
keyring/core.py . [ 4%]
keyring/credentials.py . [ 5%]
keyring/backends/chainer.py . [ 6%]
keyring/backends/fail.py . [ 7%]
keyring/backends/null.py . [ 8%]
keyring/util/__init__.py . [ 9%]
tests/test_core.py . [ 10%]
tests/test_errors.py . [ 11%]
tests/test_integration.py ... [ 14%]
tests/test_multiprocess.py xx [ 16%]
tests/test_packaging.py .. [ 18%]
tests/backends/test_SecretService.py ssssssssssss. [ 31%]
tests/backends/test_Windows.py sssssssssssssss [ 46%]
tests/backends/test_chainer.py .. [ 48%]
tests/backends/test_kwallet.py ssssssssssssssssssssssss [ 72%]
tests/backends/test_libsecret.py FFFFF.FFFF... [ 85%]
tests/backends/test_macOS.py ssssssssssss [ 97%]
tests/util/test_platform.py .s [100%]
================================================================================= FAILURES =================================================================================
________________________________________________________________ TestLibSecretKeyring.test_password_set_get ________________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fb2664ee160>
def test_password_set_get(self):
password = random_string(20)
username = random_string(20)
service = random_string(20)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7fb2663abee0>, service = '4LP9ZzbbozwvfLUguzhF', username = 'G2XQ5BMEiDlhzNAdq1j3'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets was not provided by any .service files (2)
keyring/backends/libsecret.py:63: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
________________________________________________________________ TestLibSecretKeyring.test_difficult_chars _________________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fb26659a7c0>
def test_difficult_chars(self):
password = random_string(20, self.DIFFICULT_CHARS)
username = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7fb2663bf400>, service = "^'-#>%\t\x0b)!~} \n&$}**.", username = '?_}~_@\t*\t\t.&#|+$`&[;'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets was not provided by any .service files (2)
keyring/backends/libsecret.py:63: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_________________________________________________________________ TestLibSecretKeyring.test_delete_present _________________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fb26659aee0>
def test_delete_present(self):
password = random_string(20, self.DIFFICULT_CHARS)
username = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
> self.keyring.set_password(service, username, password)
keyring/testing/backend.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7fb266450d90>, service = '*["&,]"|(`>{~\x0b/}%:\r)', username = "?*^\n&[ \n\t*\\/?'@-[<+\t"
password = ',^}`_#\x0c|\x0b>\\(\t,$[,~*%'
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = self._query(service, username, application=self.appid)
label = "Password for '{}' on '{}'".format(username, service)
try:
> stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
E gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets was not provided by any .service files (2)
keyring/backends/libsecret.py:85: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_______________________________________________________________ TestLibSecretKeyring.test_delete_not_present _______________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fb26659a220>
def test_delete_not_present(self):
username = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
with pytest.raises(errors.PasswordDeleteError):
> self.keyring.delete_password(service, username)
keyring/testing/backend.py:92:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7fb266564880>, service = '\x0c:#?{)&\n\t+[[@:~`\n\r#^', username = '^"&![(~\x0b\x0c*\'\t:\\=\t\']\n-'
def delete_password(self, service, username):
"""Delete the stored password (only the first one)"""
attributes = self._query(service, username, application=self.appid)
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets was not provided by any .service files (2)
keyring/backends/libsecret.py:103: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
______________________________________________________________ TestLibSecretKeyring.test_delete_one_in_group _______________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fb26659a6d0>
def test_delete_one_in_group(self):
username1 = random_string(20, self.DIFFICULT_CHARS)
username2 = random_string(20, self.DIFFICULT_CHARS)
password = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
> self.keyring.set_password(service, username1, password)
keyring/testing/backend.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7fb2663ab340>, service = '.;@_}),\t\t&\t}\x0b".% \\:\n', username = '\x0c\\=*"("}\n}|}"\t:\x0c>\t=#'
password = '\\{ \x0b~/=`_~-&(/<&~[=&'
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = self._query(service, username, application=self.appid)
label = "Password for '{}' on '{}'".format(username, service)
try:
> stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
E gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets was not provided by any .service files (2)
keyring/backends/libsecret.py:85: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_________________________________________________________________ TestLibSecretKeyring.test_unicode_chars __________________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fb26659af70>
def test_unicode_chars(self):
password = random_string(20, UNICODE_CHARS)
username = random_string(20, UNICODE_CHARS)
service = random_string(20, UNICODE_CHARS)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:111:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7fb2663f0190>, service = 'לкдωюπεгתωаъבםυёщόхτ', username = 'μлйхкеовשגηйюаψуוСкъ'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets was not provided by any .service files (2)
keyring/backends/libsecret.py:63: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
____________________________________________________________ TestLibSecretKeyring.test_unicode_and_ascii_chars _____________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fb26659a970>
def test_unicode_and_ascii_chars(self):
source = (
random_string(10, UNICODE_CHARS)
+ random_string(10)
+ random_string(10, self.DIFFICULT_CHARS)
)
password = random_string(20, source)
username = random_string(20, source)
service = random_string(20, source)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:122:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7fb2648395e0>, service = 'χгхIтQ]p;pXχыаυтzйB|', username = 'тXг Bт;E\x0bZυххpB;υаQp'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets was not provided by any .service files (2)
keyring/backends/libsecret.py:63: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_________________________________________________________________ TestLibSecretKeyring.test_different_user _________________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fb26659aa90>
def test_different_user(self):
"""
Issue #47 reports that WinVault isn't storing passwords for
multiple users. This test exercises that test for each of the
backends.
"""
keyring = self.keyring
> self.set_password('service1', 'user1', 'password1')
keyring/testing/backend.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:51: in set_password
self.keyring.set_password(service, username, password)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7fb26484f280>, service = 'service1', username = 'user1', password = 'password1'
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = self._query(service, username, application=self.appid)
label = "Password for '{}' on '{}'".format(username, service)
try:
> stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
E gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets was not provided by any .service files (2)
keyring/backends/libsecret.py:85: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
___________________________________________________________________ TestLibSecretKeyring.test_credential ___________________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7fb26659a940>
def test_credential(self):
keyring = self.keyring
> cred = keyring.get_credential('service', None)
keyring/testing/backend.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7fb264847310>, service = 'service', username = None
def get_credential(self, service, username):
"""Get the first username and password for a service.
Return a Credential instance
The username can be omitted, but if there is one, it will use get_password
and return a SimpleCredential containing the username and password
Otherwise, it will return the first username and password combo that it finds.
"""
query = self._query(service, username)
try:
> items = Secret.password_search_sync(
self.schema, query, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets was not provided by any .service files (2)
keyring/backends/libsecret.py:134: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
========================================================================= short test summary info ==========================================================================
SKIPPED [1] keyring/testing/backend.py:68: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:74: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:80: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:88: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:94: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:104: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:107: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:113: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:124: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:139: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:161: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:167: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:68: Needs Windows
SKIPPED [1] keyring/testing/backend.py:74: Needs Windows
SKIPPED [1] keyring/testing/backend.py:80: Needs Windows
SKIPPED [1] keyring/testing/backend.py:88: Needs Windows
SKIPPED [1] keyring/testing/backend.py:94: Needs Windows
SKIPPED [1] keyring/testing/backend.py:104: Needs Windows
SKIPPED [1] keyring/testing/backend.py:107: Needs Windows
SKIPPED [1] keyring/testing/backend.py:113: Needs Windows
SKIPPED [1] keyring/testing/backend.py:124: Needs Windows
SKIPPED [1] keyring/testing/backend.py:139: Needs Windows
SKIPPED [1] keyring/testing/backend.py:161: Needs Windows
SKIPPED [1] keyring/testing/backend.py:167: Needs Windows
SKIPPED [1] tests/backends/test_Windows.py:50: Needs Windows
SKIPPED [1] tests/backends/test_Windows.py:53: Needs Windows
SKIPPED [1] tests/backends/test_Windows.py:65: condition: sys.platform != "win32"
SKIPPED [2] keyring/testing/backend.py:68: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:74: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:80: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:88: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:94: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:104: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:107: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:113: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:124: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:139: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:161: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:167: KWallet5 unavailable
SKIPPED [1] keyring/testing/backend.py:68: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:74: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:80: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:88: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:94: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:104: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:107: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:113: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:124: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:139: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:161: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:167: macOS backend not viable
SKIPPED [1] tests/util/test_platform.py:12: condition: platform.system() != "Windows"
XFAIL tests/test_multiprocess.py::test_multiprocess_get
#410: keyring discovery fails intermittently
XFAIL tests/test_multiprocess.py::test_multiprocess_get_after_native_get
#410: keyring discovery fails intermittently
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_password_set_get - gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets wa...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_difficult_chars - gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets was...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_delete_present - gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets was ...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_delete_not_present - gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets ...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_delete_one_in_group - gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_unicode_chars - gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets was n...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_unicode_and_ascii_chars - gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.sec...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_different_user - gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets was ...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_credential - gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets was not ...
=========================================================== 9 failed, 24 passed, 64 skipped, 2 xfailed in 1.05s ============================================================ |
Hmm .. looks like it needs to be present exaxct d-bus service. |
gnome-keyring or kwallet ≥ 5.97 or keepassx or use mock service like I described here: |
Just checked and I have installed $ rpm -q kf5-kwallet
kf5-kwallet-5.97.0-2.g2v.x86_64 |
It looks like KWallet does not support automatic activation. So it's not enough to have it installed, you need to actually run kwalletd5. Note: Secret Service support in KWallet is a new feature, I have not yet had a chance to test it myself. For gnome-keyring, having it installed should be enough. |
OK .. one sec will check that variant 😋 |
A bit different result but still final result negative 😞 + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-23.9.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-23.9.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ dbus-run-session /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/keyring-23.9.0, configfile: pytest.ini
plugins: cov-3.0.0, flake8-1.1.1
collected 99 items
keyring/_properties_compat.py .. [ 2%]
keyring/backend.py . [ 3%]
keyring/core.py . [ 4%]
keyring/credentials.py . [ 5%]
keyring/backends/chainer.py . [ 6%]
keyring/backends/fail.py . [ 7%]
keyring/backends/null.py . [ 8%]
keyring/util/__init__.py . [ 9%]
tests/test_core.py . [ 10%]
tests/test_errors.py . [ 11%]
tests/test_integration.py ... [ 14%]
tests/test_multiprocess.py dbus-daemon[976988]: [session uid=1000 pid=976988] Activating service name='org.freedesktop.secrets' requested by ':1.15' (uid=1000 pid=977012 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
discover_other_daemon: 1
** (gnome-keyring-daemon:977014): WARNING **: 18:12:50.736: Couldn't connect to session bus: Cannot spawn a message bus when AT_SECURE is set
dbus-daemon[976988]: [session uid=1000 pid=976988] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
xdbus-daemon[976988]: [session uid=1000 pid=976988] Activating service name='org.freedesktop.secrets' requested by ':1.21' (uid=1000 pid=976989 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
discover_other_daemon: 1
** (gnome-keyring-daemon:977021): WARNING **: 18:14:50.893: Couldn't connect to session bus: Cannot spawn a message bus when AT_SECURE is set
dbus-daemon[976988]: [session uid=1000 pid=976988] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
x [ 16%]
tests/test_packaging.py .. [ 18%]
tests/backends/test_SecretService.py dbus-daemon[976988]: [session uid=1000 pid=976988] Activating service name='org.freedesktop.secrets' requested by ':1.22' (uid=1000 pid=976989 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
discover_other_daemon: 1
** (gnome-keyring-daemon:977031): WARNING **: 18:16:50.951: Couldn't connect to session bus: Cannot spawn a message bus when AT_SECURE is set
dbus-daemon[976988]: [session uid=1000 pid=976988] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
Fdbus-daemon[976988]: [session uid=1000 pid=976988] Activating service name='org.freedesktop.secrets' requested by ':1.23' (uid=1000 pid=976989 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
discover_other_daemon: 1
** (gnome-keyring-daemon:977040): WARNING **: 18:18:51.094: Couldn't connect to session bus: Cannot spawn a message bus when AT_SECURE is set
dbus-daemon[976988]: [session uid=1000 pid=976988] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
Fdbus-daemon[976988]: [session uid=1000 pid=976988] Activating service name='org.freedesktop.secrets' requested by ':1.24' (uid=1000 pid=976989 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
discover_other_daemon: 1
** (gnome-keyring-daemon:977047): WARNING **: 18:20:51.193: Couldn't connect to session bus: Cannot spawn a message bus when AT_SECURE is set
dbus-daemon[976988]: [session uid=1000 pid=976988] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
Fdbus-daemon[976988]: [session uid=1000 pid=976988] Activating service name='org.freedesktop.secrets' requested by ':1.25' (uid=1000 pid=976989 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
discover_other_daemon: 1
** (gnome-keyring-daemon:977058): WARNING **: 18:22:51.249: Couldn't connect to session bus: Cannot spawn a message bus when AT_SECURE is set
dbus-daemon[976988]: [session uid=1000 pid=976988] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
Fdbus-daemon[976988]: [session uid=1000 pid=976988] Activating service name='org.freedesktop.secrets' requested by ':1.26' (uid=1000 pid=976989 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
discover_other_daemon: 1
** (gnome-keyring-daemon:977066): WARNING **: 18:24:51.386: Couldn't connect to session bus: Cannot spawn a message bus when AT_SECURE is set
dbus-daemon[976988]: [session uid=1000 pid=976988] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
F.dbus-daemon[976988]: [session uid=1000 pid=976988] Activating service name='org.freedesktop.secrets' requested by ':1.27' (uid=1000 pid=976989 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
discover_other_daemon: 1
** (gnome-keyring-daemon:977075): WARNING **: 18:26:51.525: Couldn't connect to session bus: Cannot spawn a message bus when AT_SECURE is set
dbus-daemon[976988]: [session uid=1000 pid=976988] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
Fdbus-daemon[976988]: [session uid=1000 pid=976988] Activating service name='org.freedesktop.secrets' requested by ':1.28' (uid=1000 pid=976989 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
discover_other_daemon: 1
** (gnome-keyring-daemon:977083): WARNING **: 18:28:51.664: Couldn't connect to session bus: Cannot spawn a message bus when AT_SECURE is set
dbus-daemon[976988]: [session uid=1000 pid=976988] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
Fdbus-daemon[976988]: [session uid=1000 pid=976988] Activating service name='org.freedesktop.secrets' requested by ':1.29' (uid=1000 pid=976989 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
discover_other_daemon: 1
** (gnome-keyring-daemon:977091): WARNING **: 18:30:51.752: Couldn't connect to session bus: Cannot spawn a message bus when AT_SECURE is set
dbus-daemon[976988]: [session uid=1000 pid=976988] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
Fdbus-daemon[976988]: [session uid=1000 pid=976988] Activating service name='org.freedesktop.secrets' requested by ':1.30' (uid=1000 pid=976989 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
discover_other_daemon: 1
** (gnome-keyring-daemon:977102): WARNING **: 18:32:51.808: Couldn't connect to session bus: Cannot spawn a message bus when AT_SECURE is set
dbus-daemon[976988]: [session uid=1000 pid=976988] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
F... [ 31%]
tests/backends/test_Windows.py sssssssssssssss [ 46%]
tests/backends/test_chainer.py .. [ 48%]
tests/backends/test_kwallet.py ssssssssssssssssssssssss [ 72%]
tests/backends/test_libsecret.py dbus-daemon[976988]: [session uid=1000 pid=976988] Activating service name='org.freedesktop.secrets' requested by ':1.31' (uid=1000 pid=976989 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
discover_other_daemon: 1
** (gnome-keyring-daemon:977112): WARNING **: 18:34:51.897: Couldn't connect to session bus: Cannot spawn a message bus when AT_SECURE is set
FFFFdbus-daemon[976988]: [session uid=1000 pid=976988] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
F.dbus-daemon[976988]: [session uid=1000 pid=976988] Activating service name='org.freedesktop.secrets' requested by ':1.36' (uid=1000 pid=976989 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
discover_other_daemon: 1
** (gnome-keyring-daemon:977127): WARNING **: 18:36:51.944: Couldn't connect to session bus: Cannot spawn a message bus when AT_SECURE is set
FFFF... [ 85%]
tests/backends/test_macOS.py ssssssssssss [ 97%]
tests/util/test_platform.py .s [100%]
================================================================================= FAILURES =================================================================================
______________________________________________________________ TestSecretServiceKeyring.test_password_set_get ______________________________________________________________
self = <test_SecretService.TestSecretServiceKeyring object at 0x7f59152f39d0>
def test_password_set_get(self):
password = random_string(20)
username = random_string(20)
service = random_string(20)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
keyring/backends/SecretService.py:78: in get_password
collection = self.get_preferred_collection()
keyring/backends/SecretService.py:59: in get_preferred_collection
collection = secretstorage.Collection(bus, self.preferred_collection)
/usr/lib/python3.8/site-packages/secretstorage/collection.py:44: in __init__
self._collection.get_property('Label')
/usr/lib/python3.8/site-packages/secretstorage/util.py:67: in get_property
(signature, value), = self.send_and_get_reply(msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = DBusAddressWrapper('/org/freedesktop/secrets/collection/session', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection')
msg = Message(Header(<Endianness.little: 1>, <MessageType.method_call: 1>, <MessageFlag.0: 0>, 1, 50, -1, fields={<HeaderFie..., <HeaderFields.member: 3>: 'Get', <HeaderFields.signature: 8>: 'ss'}), ('org.freedesktop.Secret.Collection', 'Label'))
def send_and_get_reply(self, msg: Message) -> Any:
try:
resp_msg: Message = self._connection.send_and_get_reply(msg)
if resp_msg.header.message_type == MessageType.error:
> raise DBusErrorResponse(resp_msg)
E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] ("Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)",)
/usr/lib/python3.8/site-packages/secretstorage/util.py:48: DBusErrorResponse
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing SecretServiceKeyring; the following password prompts are for this keyring
______________________________________________________________ TestSecretServiceKeyring.test_difficult_chars _______________________________________________________________
self = <test_SecretService.TestSecretServiceKeyring object at 0x7f59152f3940>
def test_difficult_chars(self):
password = random_string(20, self.DIFFICULT_CHARS)
username = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
keyring/backends/SecretService.py:78: in get_password
collection = self.get_preferred_collection()
keyring/backends/SecretService.py:59: in get_preferred_collection
collection = secretstorage.Collection(bus, self.preferred_collection)
/usr/lib/python3.8/site-packages/secretstorage/collection.py:44: in __init__
self._collection.get_property('Label')
/usr/lib/python3.8/site-packages/secretstorage/util.py:67: in get_property
(signature, value), = self.send_and_get_reply(msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = DBusAddressWrapper('/org/freedesktop/secrets/collection/session', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection')
msg = Message(Header(<Endianness.little: 1>, <MessageType.method_call: 1>, <MessageFlag.0: 0>, 1, 50, -1, fields={<HeaderFie..., <HeaderFields.member: 3>: 'Get', <HeaderFields.signature: 8>: 'ss'}), ('org.freedesktop.Secret.Collection', 'Label'))
def send_and_get_reply(self, msg: Message) -> Any:
try:
resp_msg: Message = self._connection.send_and_get_reply(msg)
if resp_msg.header.message_type == MessageType.error:
> raise DBusErrorResponse(resp_msg)
E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] ("Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)",)
/usr/lib/python3.8/site-packages/secretstorage/util.py:48: DBusErrorResponse
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing SecretServiceKeyring; the following password prompts are for this keyring
_______________________________________________________________ TestSecretServiceKeyring.test_delete_present _______________________________________________________________
self = <test_SecretService.TestSecretServiceKeyring object at 0x7f59152f34c0>
def test_delete_present(self):
password = random_string(20, self.DIFFICULT_CHARS)
username = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
> self.keyring.set_password(service, username, password)
keyring/testing/backend.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/backends/SecretService.py:87: in set_password
collection = self.get_preferred_collection()
keyring/backends/SecretService.py:59: in get_preferred_collection
collection = secretstorage.Collection(bus, self.preferred_collection)
/usr/lib/python3.8/site-packages/secretstorage/collection.py:44: in __init__
self._collection.get_property('Label')
/usr/lib/python3.8/site-packages/secretstorage/util.py:67: in get_property
(signature, value), = self.send_and_get_reply(msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = DBusAddressWrapper('/org/freedesktop/secrets/collection/session', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection')
msg = Message(Header(<Endianness.little: 1>, <MessageType.method_call: 1>, <MessageFlag.0: 0>, 1, 50, -1, fields={<HeaderFie..., <HeaderFields.member: 3>: 'Get', <HeaderFields.signature: 8>: 'ss'}), ('org.freedesktop.Secret.Collection', 'Label'))
def send_and_get_reply(self, msg: Message) -> Any:
try:
resp_msg: Message = self._connection.send_and_get_reply(msg)
if resp_msg.header.message_type == MessageType.error:
> raise DBusErrorResponse(resp_msg)
E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] ("Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)",)
/usr/lib/python3.8/site-packages/secretstorage/util.py:48: DBusErrorResponse
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing SecretServiceKeyring; the following password prompts are for this keyring
_____________________________________________________________ TestSecretServiceKeyring.test_delete_not_present _____________________________________________________________
self = <test_SecretService.TestSecretServiceKeyring object at 0x7f59152f3b20>
def test_delete_not_present(self):
username = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
with pytest.raises(errors.PasswordDeleteError):
> self.keyring.delete_password(service, username)
keyring/testing/backend.py:92:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/backends/SecretService.py:95: in delete_password
collection = self.get_preferred_collection()
keyring/backends/SecretService.py:59: in get_preferred_collection
collection = secretstorage.Collection(bus, self.preferred_collection)
/usr/lib/python3.8/site-packages/secretstorage/collection.py:44: in __init__
self._collection.get_property('Label')
/usr/lib/python3.8/site-packages/secretstorage/util.py:67: in get_property
(signature, value), = self.send_and_get_reply(msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = DBusAddressWrapper('/org/freedesktop/secrets/collection/session', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection')
msg = Message(Header(<Endianness.little: 1>, <MessageType.method_call: 1>, <MessageFlag.0: 0>, 1, 50, -1, fields={<HeaderFie..., <HeaderFields.member: 3>: 'Get', <HeaderFields.signature: 8>: 'ss'}), ('org.freedesktop.Secret.Collection', 'Label'))
def send_and_get_reply(self, msg: Message) -> Any:
try:
resp_msg: Message = self._connection.send_and_get_reply(msg)
if resp_msg.header.message_type == MessageType.error:
> raise DBusErrorResponse(resp_msg)
E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] ("Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)",)
/usr/lib/python3.8/site-packages/secretstorage/util.py:48: DBusErrorResponse
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing SecretServiceKeyring; the following password prompts are for this keyring
____________________________________________________________ TestSecretServiceKeyring.test_delete_one_in_group _____________________________________________________________
self = <test_SecretService.TestSecretServiceKeyring object at 0x7f59152f3a60>
def test_delete_one_in_group(self):
username1 = random_string(20, self.DIFFICULT_CHARS)
username2 = random_string(20, self.DIFFICULT_CHARS)
password = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
> self.keyring.set_password(service, username1, password)
keyring/testing/backend.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/backends/SecretService.py:87: in set_password
collection = self.get_preferred_collection()
keyring/backends/SecretService.py:59: in get_preferred_collection
collection = secretstorage.Collection(bus, self.preferred_collection)
/usr/lib/python3.8/site-packages/secretstorage/collection.py:44: in __init__
self._collection.get_property('Label')
/usr/lib/python3.8/site-packages/secretstorage/util.py:67: in get_property
(signature, value), = self.send_and_get_reply(msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = DBusAddressWrapper('/org/freedesktop/secrets/collection/session', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection')
msg = Message(Header(<Endianness.little: 1>, <MessageType.method_call: 1>, <MessageFlag.0: 0>, 1, 50, -1, fields={<HeaderFie..., <HeaderFields.member: 3>: 'Get', <HeaderFields.signature: 8>: 'ss'}), ('org.freedesktop.Secret.Collection', 'Label'))
def send_and_get_reply(self, msg: Message) -> Any:
try:
resp_msg: Message = self._connection.send_and_get_reply(msg)
if resp_msg.header.message_type == MessageType.error:
> raise DBusErrorResponse(resp_msg)
E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] ("Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)",)
/usr/lib/python3.8/site-packages/secretstorage/util.py:48: DBusErrorResponse
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing SecretServiceKeyring; the following password prompts are for this keyring
_______________________________________________________________ TestSecretServiceKeyring.test_unicode_chars ________________________________________________________________
self = <test_SecretService.TestSecretServiceKeyring object at 0x7f59170e4070>
def test_unicode_chars(self):
password = random_string(20, UNICODE_CHARS)
username = random_string(20, UNICODE_CHARS)
service = random_string(20, UNICODE_CHARS)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:111:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
keyring/backends/SecretService.py:78: in get_password
collection = self.get_preferred_collection()
keyring/backends/SecretService.py:59: in get_preferred_collection
collection = secretstorage.Collection(bus, self.preferred_collection)
/usr/lib/python3.8/site-packages/secretstorage/collection.py:44: in __init__
self._collection.get_property('Label')
/usr/lib/python3.8/site-packages/secretstorage/util.py:67: in get_property
(signature, value), = self.send_and_get_reply(msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = DBusAddressWrapper('/org/freedesktop/secrets/collection/session', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection')
msg = Message(Header(<Endianness.little: 1>, <MessageType.method_call: 1>, <MessageFlag.0: 0>, 1, 50, -1, fields={<HeaderFie..., <HeaderFields.member: 3>: 'Get', <HeaderFields.signature: 8>: 'ss'}), ('org.freedesktop.Secret.Collection', 'Label'))
def send_and_get_reply(self, msg: Message) -> Any:
try:
resp_msg: Message = self._connection.send_and_get_reply(msg)
if resp_msg.header.message_type == MessageType.error:
> raise DBusErrorResponse(resp_msg)
E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] ("Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)",)
/usr/lib/python3.8/site-packages/secretstorage/util.py:48: DBusErrorResponse
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing SecretServiceKeyring; the following password prompts are for this keyring
__________________________________________________________ TestSecretServiceKeyring.test_unicode_and_ascii_chars ___________________________________________________________
self = <test_SecretService.TestSecretServiceKeyring object at 0x7f59152e8070>
def test_unicode_and_ascii_chars(self):
source = (
random_string(10, UNICODE_CHARS)
+ random_string(10)
+ random_string(10, self.DIFFICULT_CHARS)
)
password = random_string(20, source)
username = random_string(20, source)
service = random_string(20, source)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:122:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
keyring/backends/SecretService.py:78: in get_password
collection = self.get_preferred_collection()
keyring/backends/SecretService.py:59: in get_preferred_collection
collection = secretstorage.Collection(bus, self.preferred_collection)
/usr/lib/python3.8/site-packages/secretstorage/collection.py:44: in __init__
self._collection.get_property('Label')
/usr/lib/python3.8/site-packages/secretstorage/util.py:67: in get_property
(signature, value), = self.send_and_get_reply(msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = DBusAddressWrapper('/org/freedesktop/secrets/collection/session', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection')
msg = Message(Header(<Endianness.little: 1>, <MessageType.method_call: 1>, <MessageFlag.0: 0>, 1, 50, -1, fields={<HeaderFie..., <HeaderFields.member: 3>: 'Get', <HeaderFields.signature: 8>: 'ss'}), ('org.freedesktop.Secret.Collection', 'Label'))
def send_and_get_reply(self, msg: Message) -> Any:
try:
resp_msg: Message = self._connection.send_and_get_reply(msg)
if resp_msg.header.message_type == MessageType.error:
> raise DBusErrorResponse(resp_msg)
E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] ("Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)",)
/usr/lib/python3.8/site-packages/secretstorage/util.py:48: DBusErrorResponse
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing SecretServiceKeyring; the following password prompts are for this keyring
_______________________________________________________________ TestSecretServiceKeyring.test_different_user _______________________________________________________________
self = <test_SecretService.TestSecretServiceKeyring object at 0x7f59152f30a0>
def test_different_user(self):
"""
Issue #47 reports that WinVault isn't storing passwords for
multiple users. This test exercises that test for each of the
backends.
"""
keyring = self.keyring
> self.set_password('service1', 'user1', 'password1')
keyring/testing/backend.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:51: in set_password
self.keyring.set_password(service, username, password)
keyring/backends/SecretService.py:87: in set_password
collection = self.get_preferred_collection()
keyring/backends/SecretService.py:59: in get_preferred_collection
collection = secretstorage.Collection(bus, self.preferred_collection)
/usr/lib/python3.8/site-packages/secretstorage/collection.py:44: in __init__
self._collection.get_property('Label')
/usr/lib/python3.8/site-packages/secretstorage/util.py:67: in get_property
(signature, value), = self.send_and_get_reply(msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = DBusAddressWrapper('/org/freedesktop/secrets/collection/session', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection')
msg = Message(Header(<Endianness.little: 1>, <MessageType.method_call: 1>, <MessageFlag.0: 0>, 1, 50, -1, fields={<HeaderFie..., <HeaderFields.member: 3>: 'Get', <HeaderFields.signature: 8>: 'ss'}), ('org.freedesktop.Secret.Collection', 'Label'))
def send_and_get_reply(self, msg: Message) -> Any:
try:
resp_msg: Message = self._connection.send_and_get_reply(msg)
if resp_msg.header.message_type == MessageType.error:
> raise DBusErrorResponse(resp_msg)
E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] ("Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)",)
/usr/lib/python3.8/site-packages/secretstorage/util.py:48: DBusErrorResponse
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing SecretServiceKeyring; the following password prompts are for this keyring
_________________________________________________________________ TestSecretServiceKeyring.test_credential _________________________________________________________________
self = <test_SecretService.TestSecretServiceKeyring object at 0x7f59152f30d0>
def test_credential(self):
keyring = self.keyring
> cred = keyring.get_credential('service', None)
keyring/testing/backend.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/backends/SecretService.py:112: in get_credential
collection = self.get_preferred_collection()
keyring/backends/SecretService.py:59: in get_preferred_collection
collection = secretstorage.Collection(bus, self.preferred_collection)
/usr/lib/python3.8/site-packages/secretstorage/collection.py:44: in __init__
self._collection.get_property('Label')
/usr/lib/python3.8/site-packages/secretstorage/util.py:67: in get_property
(signature, value), = self.send_and_get_reply(msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = DBusAddressWrapper('/org/freedesktop/secrets/collection/session', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection')
msg = Message(Header(<Endianness.little: 1>, <MessageType.method_call: 1>, <MessageFlag.0: 0>, 1, 50, -1, fields={<HeaderFie..., <HeaderFields.member: 3>: 'Get', <HeaderFields.signature: 8>: 'ss'}), ('org.freedesktop.Secret.Collection', 'Label'))
def send_and_get_reply(self, msg: Message) -> Any:
try:
resp_msg: Message = self._connection.send_and_get_reply(msg)
if resp_msg.header.message_type == MessageType.error:
> raise DBusErrorResponse(resp_msg)
E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] ("Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)",)
/usr/lib/python3.8/site-packages/secretstorage/util.py:48: DBusErrorResponse
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing SecretServiceKeyring; the following password prompts are for this keyring
________________________________________________________________ TestLibSecretKeyring.test_password_set_get ________________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7f59152732e0>
def test_password_set_get(self):
password = random_string(20)
username = random_string(20)
service = random_string(20)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f59150eb610>, service = 'LUIlfxKWfZCPaXyprfg4', username = 'UV0Q6iLcdeOE5ZiHPaDW'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached (24)
keyring/backends/libsecret.py:63: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
________________________________________________________________ TestLibSecretKeyring.test_difficult_chars _________________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7f591531d6a0>
def test_difficult_chars(self):
password = random_string(20, self.DIFFICULT_CHARS)
username = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f59150905b0>, service = '.=[>\t*\t*\x0c:=?;>-$ ^<-', username = '*.)$?~%=+%>\t)<:}@$`?'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached (24)
keyring/backends/libsecret.py:63: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_________________________________________________________________ TestLibSecretKeyring.test_delete_present _________________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7f591531de20>
def test_delete_present(self):
password = random_string(20, self.DIFFICULT_CHARS)
username = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
> self.keyring.set_password(service, username, password)
keyring/testing/backend.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f59150b1cd0>, service = '+}+:?~;;>=\\*`}#:.?-.', username = '@\r\\+#&" <:\r]\t=.;<|`-'
password = '-^+\x0b``}.`]\n\n%]-<,^?)'
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = self._query(service, username, application=self.appid)
label = "Password for '{}' on '{}'".format(username, service)
try:
> stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
E gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached (24)
keyring/backends/libsecret.py:85: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_______________________________________________________________ TestLibSecretKeyring.test_delete_not_present _______________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7f591531d040>
def test_delete_not_present(self):
username = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
with pytest.raises(errors.PasswordDeleteError):
> self.keyring.delete_password(service, username)
keyring/testing/backend.py:92:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f59152f54c0>, service = '\x0c)#\r.\r)*`\r]-]^]{*=\\\r', username = '!$=<\r*}:\x0c\t \n}<\t#+;.@'
def delete_password(self, service, username):
"""Delete the stored password (only the first one)"""
attributes = self._query(service, username, application=self.appid)
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached (24)
keyring/backends/libsecret.py:103: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
______________________________________________________________ TestLibSecretKeyring.test_delete_one_in_group _______________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7f591531d3a0>
def test_delete_one_in_group(self):
username1 = random_string(20, self.DIFFICULT_CHARS)
username2 = random_string(20, self.DIFFICULT_CHARS)
password = random_string(20, self.DIFFICULT_CHARS)
service = random_string(20, self.DIFFICULT_CHARS)
> self.keyring.set_password(service, username1, password)
keyring/testing/backend.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f5915104130>, service = '_*-%=)@"&&.$)](,?\x0b\n(', username = '\t=#\r>`;>\t*+_/`<("^]$'
password = '",]$_@\x0b-="&`@\n&\r)*+_'
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = self._query(service, username, application=self.appid)
label = "Password for '{}' on '{}'".format(username, service)
try:
> stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
E gi.repository.GLib.GError: g-dbus-error-quark: Error calling StartServiceByName for org.freedesktop.secrets: Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms) (20)
keyring/backends/libsecret.py:85: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_________________________________________________________________ TestLibSecretKeyring.test_unicode_chars __________________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7f591531de80>
def test_unicode_chars(self):
password = random_string(20, UNICODE_CHARS)
username = random_string(20, UNICODE_CHARS)
service = random_string(20, UNICODE_CHARS)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:111:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f5915090610>, service = 'Сεדаתхהεоסавитюнאציу', username = 'ξψкчъоזеτмиεκчаόаоדы'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached (24)
keyring/backends/libsecret.py:63: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
____________________________________________________________ TestLibSecretKeyring.test_unicode_and_ascii_chars _____________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7f591531d970>
def test_unicode_and_ascii_chars(self):
source = (
random_string(10, UNICODE_CHARS)
+ random_string(10)
+ random_string(10, self.DIFFICULT_CHARS)
)
password = random_string(20, source)
username = random_string(20, source)
service = random_string(20, source)
> self.check_set_get(service, username, password)
keyring/testing/backend.py:122:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:58: in check_set_get
assert keyring.get_password(service, username) is None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f59150bd4c0>, service = 'qAπA?еаdט?(|тд_νдAט5', username = 'еAад-4@аеDт&еט(dnφn?'
def get_password(self, service, username):
"""Get password of the username for the service"""
attributes = self._query(service, username, application=self.appid)
try:
> items = Secret.password_search_sync(
self.schema, attributes, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached (24)
keyring/backends/libsecret.py:63: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
_________________________________________________________________ TestLibSecretKeyring.test_different_user _________________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7f591531dbe0>
def test_different_user(self):
"""
Issue #47 reports that WinVault isn't storing passwords for
multiple users. This test exercises that test for each of the
backends.
"""
keyring = self.keyring
> self.set_password('service1', 'user1', 'password1')
keyring/testing/backend.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/testing/backend.py:51: in set_password
self.keyring.set_password(service, username, password)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f591516f880>, service = 'service1', username = 'user1', password = 'password1'
def set_password(self, service, username, password):
"""Set password for the username of the service"""
attributes = self._query(service, username, application=self.appid)
label = "Password for '{}' on '{}'".format(username, service)
try:
> stored = Secret.password_store_sync(
self.schema, attributes, self.collection, label, password, None
)
E gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached (24)
keyring/backends/libsecret.py:85: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
___________________________________________________________________ TestLibSecretKeyring.test_credential ___________________________________________________________________
self = <test_libsecret.TestLibSecretKeyring object at 0x7f591531da00>
def test_credential(self):
keyring = self.keyring
> cred = keyring.get_credential('service', None)
keyring/testing/backend.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.libsecret.Keyring object at 0x7f5915179400>, service = 'service', username = None
def get_credential(self, service, username):
"""Get the first username and password for a service.
Return a Credential instance
The username can be omitted, but if there is one, it will use get_password
and return a SimpleCredential containing the username and password
Otherwise, it will return the first username and password combo that it finds.
"""
query = self._query(service, username)
try:
> items = Secret.password_search_sync(
self.schema, query, Secret.SearchFlags.UNLOCK, None
)
E gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached (24)
keyring/backends/libsecret.py:134: Error
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Testing LibSecretKeyring; the following password prompts are for this keyring
========================================================================= short test summary info ==========================================================================
SKIPPED [1] keyring/testing/backend.py:68: Needs Windows
SKIPPED [1] keyring/testing/backend.py:74: Needs Windows
SKIPPED [1] keyring/testing/backend.py:80: Needs Windows
SKIPPED [1] keyring/testing/backend.py:88: Needs Windows
SKIPPED [1] keyring/testing/backend.py:94: Needs Windows
SKIPPED [1] keyring/testing/backend.py:104: Needs Windows
SKIPPED [1] keyring/testing/backend.py:107: Needs Windows
SKIPPED [1] keyring/testing/backend.py:113: Needs Windows
SKIPPED [1] keyring/testing/backend.py:124: Needs Windows
SKIPPED [1] keyring/testing/backend.py:139: Needs Windows
SKIPPED [1] keyring/testing/backend.py:161: Needs Windows
SKIPPED [1] keyring/testing/backend.py:167: Needs Windows
SKIPPED [1] tests/backends/test_Windows.py:50: Needs Windows
SKIPPED [1] tests/backends/test_Windows.py:53: Needs Windows
SKIPPED [1] tests/backends/test_Windows.py:65: condition: sys.platform != "win32"
SKIPPED [2] keyring/testing/backend.py:68: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:74: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:80: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:88: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:94: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:104: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:107: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:113: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:124: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:139: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:161: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:167: KWallet5 unavailable
SKIPPED [1] keyring/testing/backend.py:68: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:74: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:80: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:88: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:94: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:104: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:107: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:113: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:124: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:139: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:161: macOS backend not viable
SKIPPED [1] keyring/testing/backend.py:167: macOS backend not viable
SKIPPED [1] tests/util/test_platform.py:12: condition: platform.system() != "Windows"
XFAIL tests/test_multiprocess.py::test_multiprocess_get
#410: keyring discovery fails intermittently
XFAIL tests/test_multiprocess.py::test_multiprocess_get_after_native_get
#410: keyring discovery fails intermittently
FAILED tests/backends/test_SecretService.py::TestSecretServiceKeyring::test_password_set_get - jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] ...
FAILED tests/backends/test_SecretService.py::TestSecretServiceKeyring::test_difficult_chars - jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] (...
FAILED tests/backends/test_SecretService.py::TestSecretServiceKeyring::test_delete_present - jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] ("...
FAILED tests/backends/test_SecretService.py::TestSecretServiceKeyring::test_delete_not_present - jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut...
FAILED tests/backends/test_SecretService.py::TestSecretServiceKeyring::test_delete_one_in_group - jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOu...
FAILED tests/backends/test_SecretService.py::TestSecretServiceKeyring::test_unicode_chars - jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] ("F...
FAILED tests/backends/test_SecretService.py::TestSecretServiceKeyring::test_unicode_and_ascii_chars - jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.Tim...
FAILED tests/backends/test_SecretService.py::TestSecretServiceKeyring::test_different_user - jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] ("...
FAILED tests/backends/test_SecretService.py::TestSecretServiceKeyring::test_credential - jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] ("Fail...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_password_set_get - gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for ...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_difficult_chars - gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for o...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_delete_present - gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for or...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_delete_not_present - gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName fo...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_delete_one_in_group - gi.repository.GLib.GError: g-dbus-error-quark: Error calling StartServiceByName...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_unicode_chars - gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for org...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_unicode_and_ascii_chars - gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByNa...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_different_user - gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for or...
FAILED tests/backends/test_libsecret.py::TestLibSecretKeyring::test_credential - gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for org.fr...
==================================================== 18 failed, 27 passed, 52 skipped, 2 xfailed in 1542.37s (0:25:42) ===================================================== |
As far as I know, I personally have never run these tests successfully, and we've been unsuccessful in getting them to run in CI as well, so I appreciate your patience and tenacity working on it. Thanks mitya57 for the pointers in secretstorage. I might try to apply those to a docker container and see if I can overcome my lack of success testing this backend. |
Your build of gnome-keyring requires CAP_IPC_LOCK capabilities. Please make sure your parent process has this capability. Alternatively, gnome-keyring can be built without capabilities support. This is what Debian does now: |
Ha .. that is very importand detail!! |
Hmm .. just checked 🤔 [tkloczko@devel-g2v SPECS]$ ls -l /usr/bin/gnome-keyring*
lrwxrwxrwx 1 root root 15 Aug 27 03:27 /usr/bin/gnome-keyring -> gnome-keyring-3
-rwxr-xr-x 1 root root 24704 Aug 27 03:27 /usr/bin/gnome-keyring-3
-rwxr-xr-x 1 root root 953760 Aug 27 03:27 /usr/bin/gnome-keyring-daemon
[tkloczko@devel-g2v SPECS]$ getcap /usr/bin/gnome-keyring-daemon
/usr/bin/gnome-keyring-daemon cap_ipc_lock=ep In gnome-keyring.spec I have %files -f %{name}.lang
%attr(755,root,root) %{_bindir}/gnome-keyring
%attr(755,root,root) %{_bindir}/gnome-keyring-?
%attr(755,root,root) %caps(cap_ipc_lock=ep) %{_bindir}/gnome-keyring-daemon So theoretically executeds gnome-keyring-daemon shouild have that capability 🤔 |
I see where the problem is .. %build
autoreconf -fiv
%configure \
--disable-debug \
--enable-pam \
--without-libcap-ng \
--with-pam-dir=%{_libdir}/security \
--with-systemd \
%{nil} Will try to rebuild with enabled capabilities and than repeat |
Nope .. still the same 🤔 + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-23.9.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-23.9.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ dbus-run-session /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/keyring-23.9.0, configfile: pytest.ini
plugins: forked-1.4.0, xdist-2.5.0, hypothesis-6.41.0, cov-3.0.0, flake8-1.1.1
collected 99 items
keyring/_properties_compat.py .. [ 2%]
keyring/backend.py . [ 3%]
keyring/core.py . [ 4%]
keyring/credentials.py . [ 5%]
keyring/backends/chainer.py . [ 6%]
keyring/backends/fail.py . [ 7%]
keyring/backends/null.py . [ 8%]
keyring/util/__init__.py . [ 9%]
tests/test_core.py . [ 10%]
tests/test_errors.py . [ 11%]
tests/test_integration.py ... [ 14%]
tests/test_multiprocess.py dbus-daemon[1296869]: [session uid=1000 pid=1296869] Activating service name='org.freedesktop.secrets' requested by ':1.15' (uid=1000 pid=1296893 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
** Message: 15:56:18.577: couldn't access control socket: /run/user/1000/keyring/control: No such file or directory
discover_other_daemon: 0** Message: 15:56:18.579: couldn't connect to dbus session bus: Cannot spawn a message bus when AT_SECURE is set
** Message: 15:56:18.581: couldn't connect to dbus session bus: Cannot spawn a message bus when AT_SECURE is set
** Message: 15:56:18.581: couldn't connect to dbus session bus: Cannot spawn a message bus when AT_SECURE is set
dbus-daemon[1296869]: [session uid=1000 pid=1296869] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
xdbus-daemon[1296869]: [session uid=1000 pid=1296869] Activating service name='org.freedesktop.secrets' requested by ':1.21' (uid=1000 pid=1296870 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
** Message: 15:58:18.751: couldn't connect to control socket at: /run/user/1000/keyring/control: Connection refused
discover_other_daemon: 0** Message: 15:58:18.752: couldn't connect to dbus session bus: Cannot spawn a message bus when AT_SECURE is set
** Message: 15:58:18.755: couldn't connect to dbus session bus: Cannot spawn a message bus when AT_SECURE is set
** Message: 15:58:18.755: couldn't connect to dbus session bus: Cannot spawn a message bus when AT_SECURE is set
dbus-daemon[1296869]: [session uid=1000 pid=1296869] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
x [ 16%]
tests/test_packaging.py .. [ 18%]
tests/backends/test_SecretService.py dbus-daemon[1296869]: [session uid=1000 pid=1296869] Activating service name='org.freedesktop.secrets' requested by ':1.22' (uid=1000 pid=1296870 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
** Message: 16:00:18.904: couldn't connect to control socket at: /run/user/1000/keyring/control: Connection refused
discover_other_daemon: 0** Message: 16:00:18.905: couldn't connect to dbus session bus: Cannot spawn a message bus when AT_SECURE is set
** Message: 16:00:18.908: couldn't connect to dbus session bus: Cannot spawn a message bus when AT_SECURE is set
** Message: 16:00:18.908: couldn't connect to dbus session bus: Cannot spawn a message bus when AT_SECURE is set
dbus-daemon[1296869]: [session uid=1000 pid=1296869] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
Fdbus-daemon[1296869]: [session uid=1000 pid=1296869] Activating service name='org.freedesktop.secrets' requested by ':1.23' (uid=1000 pid=1296870 comm="/usr/bin/python3 /usr/bin/pytest -ra" label="kernel")
** Message: 16:02:19.045: couldn't connect to control socket at: /run/user/1000/keyring/control: Connection refused
discover_other_daemon: 0** Message: 16:02:19.046: couldn't connect to dbus session bus: Cannot spawn a message bus when AT_SECURE is set
** Message: 16:02:19.049: couldn't connect to dbus session bus: Cannot spawn a message bus when AT_SECURE is set
** Message: 16:02:19.049: couldn't connect to dbus session bus: Cannot spawn a message bus when AT_SECURE is set After reinstall gnome-keyring I've killed alredy runnimg gnome-keyring-daemoin process. |
Just tested 25.1.0 and looks like now Windows and MacOS units are executed on Linux + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-25.1.0~no_loopy_deps-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-25.1.0~no_loopy_deps-2.fc37.x86_64/usr/lib/python3.10/site-packages
+ dbus-run-session -- /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.10.14, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/keyring-25.1.0
configfile: pytest.ini
plugins: flake8-1.1.1
collected 83 items / 2 errors
========================================================================================== ERRORS ===========================================================================================
______________________________________________________________________ ERROR collecting tests/backends/test_Windows.py ______________________________________________________________________
tests/backends/test_Windows.py:10: in <module>
not keyring.backends.Windows.WinVaultKeyring.viable, reason="Needs Windows"
E AttributeError: module 'keyring.backends' has no attribute 'Windows'
_______________________________________________________________________ ERROR collecting tests/backends/test_macOS.py _______________________________________________________________________
tests/backends/test_macOS.py:9: in <module>
not keyring.backends.macOS.Keyring.viable,
E AttributeError: module 'keyring.backends' has no attribute 'macOS'
================================================================================== short test summary info ==================================================================================
ERROR tests/backends/test_Windows.py - AttributeError: module 'keyring.backends' has no attribute 'Windows'
ERROR tests/backends/test_macOS.py - AttributeError: module 'keyring.backends' has no attribute 'macOS'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================================== 2 errors in 0.36s ===================================================================================== |
After add tests/backends/test_Windows.py and tests/backends/test_macOS.py to --ignore list pytest still fails Here is pytest output:+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-25.1.0~no_loopy_deps-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-25.1.0~no_loopy_deps-2.fc37.x86_64/usr/lib/python3.10/site-packages
+ dbus-run-session -- /usr/bin/pytest -ra -m 'not network' --ignore tests/backends/test_Windows.py --ignore tests/backends/test_macOS.py
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.10.14, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/keyring-25.1.0
configfile: pytest.ini
plugins: flake8-1.1.1
collected 83 items
keyring/backend.py . [ 1%]
keyring/backends/chainer.py . [ 2%]
keyring/backends/fail.py . [ 3%]
keyring/backends/null.py . [ 4%]
keyring/cli.py . [ 6%]
keyring/compat/properties.py .. [ 8%]
keyring/core.py . [ 9%]
keyring/credentials.py . [ 10%]
keyring/devpi_client.py . [ 12%]
tests/backends/test_SecretService.py sssssssssssss. [ 28%]
tests/backends/test_chainer.py FF [ 31%]
tests/backends/test_kwallet.py ssssssssssssssssssssssssss [ 62%]
tests/backends/test_libsecret.py sssssssssssss. [ 79%]
tests/test_cli.py .EEE [ 84%]
tests/test_core.py ... [ 87%]
tests/test_errors.py . [ 89%]
tests/test_integration.py ... [ 92%]
tests/test_multiprocess.py xx [ 95%]
tests/test_packaging.py .. [ 97%]
tests/util/test_platform.py .s [100%]
========================================================================================== ERRORS ===========================================================================================
__________________________________________________________________________ ERROR at setup of test_set_interactive ___________________________________________________________________________
thing = <module 'keyring' from '/home/tkloczko/rpmbuild/BUILD/keyring-25.1.0/keyring/__init__.py'>, comp = 'cli', import_path = 'keyring.cli'
def _dot_lookup(thing, comp, import_path):
try:
> return getattr(thing, comp)
E AttributeError: module 'keyring' has no attribute 'cli'
/usr/lib64/python3.10/unittest/mock.py:1248: AttributeError
During handling of the above exception, another exception occurred:
@pytest.fixture
def mocked_set():
> with mock.patch('keyring.cli.set_password') as set_password:
tests/test_cli.py:35:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.10/unittest/mock.py:1431: in __enter__
self.target = self.getter()
/usr/lib64/python3.10/unittest/mock.py:1618: in <lambda>
getter = lambda: _importer(target)
/usr/lib64/python3.10/unittest/mock.py:1261: in _importer
thing = _dot_lookup(thing, comp, import_path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
thing = <module 'keyring' from '/home/tkloczko/rpmbuild/BUILD/keyring-25.1.0/keyring/__init__.py'>, comp = 'cli', import_path = 'keyring.cli'
def _dot_lookup(thing, comp, import_path):
try:
return getattr(thing, comp)
except AttributeError:
__import__(import_path)
> return getattr(thing, comp)
E AttributeError: module 'keyring' has no attribute 'cli'
/usr/lib64/python3.10/unittest/mock.py:1251: AttributeError
______________________________________________________________________________ ERROR at setup of test_set_pipe ______________________________________________________________________________
thing = <module 'keyring' from '/home/tkloczko/rpmbuild/BUILD/keyring-25.1.0/keyring/__init__.py'>, comp = 'cli', import_path = 'keyring.cli'
def _dot_lookup(thing, comp, import_path):
try:
> return getattr(thing, comp)
E AttributeError: module 'keyring' has no attribute 'cli'
/usr/lib64/python3.10/unittest/mock.py:1248: AttributeError
During handling of the above exception, another exception occurred:
@pytest.fixture
def mocked_set():
> with mock.patch('keyring.cli.set_password') as set_password:
tests/test_cli.py:35:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.10/unittest/mock.py:1431: in __enter__
self.target = self.getter()
/usr/lib64/python3.10/unittest/mock.py:1618: in <lambda>
getter = lambda: _importer(target)
/usr/lib64/python3.10/unittest/mock.py:1261: in _importer
thing = _dot_lookup(thing, comp, import_path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
thing = <module 'keyring' from '/home/tkloczko/rpmbuild/BUILD/keyring-25.1.0/keyring/__init__.py'>, comp = 'cli', import_path = 'keyring.cli'
def _dot_lookup(thing, comp, import_path):
try:
return getattr(thing, comp)
except AttributeError:
__import__(import_path)
> return getattr(thing, comp)
E AttributeError: module 'keyring' has no attribute 'cli'
/usr/lib64/python3.10/unittest/mock.py:1251: AttributeError
__________________________________________________________________________ ERROR at setup of test_set_pipe_newline __________________________________________________________________________
thing = <module 'keyring' from '/home/tkloczko/rpmbuild/BUILD/keyring-25.1.0/keyring/__init__.py'>, comp = 'cli', import_path = 'keyring.cli'
def _dot_lookup(thing, comp, import_path):
try:
> return getattr(thing, comp)
E AttributeError: module 'keyring' has no attribute 'cli'
/usr/lib64/python3.10/unittest/mock.py:1248: AttributeError
During handling of the above exception, another exception occurred:
@pytest.fixture
def mocked_set():
> with mock.patch('keyring.cli.set_password') as set_password:
tests/test_cli.py:35:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.10/unittest/mock.py:1431: in __enter__
self.target = self.getter()
/usr/lib64/python3.10/unittest/mock.py:1618: in <lambda>
getter = lambda: _importer(target)
/usr/lib64/python3.10/unittest/mock.py:1261: in _importer
thing = _dot_lookup(thing, comp, import_path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
thing = <module 'keyring' from '/home/tkloczko/rpmbuild/BUILD/keyring-25.1.0/keyring/__init__.py'>, comp = 'cli', import_path = 'keyring.cli'
def _dot_lookup(thing, comp, import_path):
try:
return getattr(thing, comp)
except AttributeError:
__import__(import_path)
> return getattr(thing, comp)
E AttributeError: module 'keyring' has no attribute 'cli'
/usr/lib64/python3.10/unittest/mock.py:1251: AttributeError
========================================================================================= FAILURES ==========================================================================================
____________________________________________________________________ TestChainer.test_chainer_gets_from_highest_priority ____________________________________________________________________
self = <tests.backends.test_chainer.TestChainer object at 0x7f6baeedd5d0>, two_keyrings = None
def test_chainer_gets_from_highest_priority(self, two_keyrings):
> chainer = keyring.backends.chainer.ChainerBackend()
E AttributeError: module 'keyring.backends' has no attribute 'chainer'
tests/backends/test_chainer.py:35: AttributeError
__________________________________________________________________________ TestChainer.test_chainer_defers_to_fail __________________________________________________________________________
self = <tests.backends.test_chainer.TestChainer object at 0x7f6baeedf0d0>, monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f6baebfdb70>
def test_chainer_defers_to_fail(self, monkeypatch):
"""
The Chainer backend should defer to the Fail backend when there are
no backends to be chained.
"""
monkeypatch.setattr('keyring.backend.get_all_keyring', tuple)
assert keyring.backend.by_priority(
keyring.backends.chainer.ChainerBackend
> ) < keyring.backend.by_priority(keyring.backends.fail.Keyring)
E AttributeError: module 'keyring.backends' has no attribute 'chainer'
tests/backends/test_chainer.py:47: AttributeError
========================================================================================= XFAILURES =========================================================================================
___________________________________________________________________________________ test_multiprocess_get ___________________________________________________________________________________
def test_multiprocess_get():
proc1 = multiprocessing.Process(target=subprocess_get)
proc1.start()
proc1.join()
> assert proc1.exitcode == 0
E AssertionError: assert 1 == 0
E + where 1 = <Process name='Process-1' pid=1386016 parent=1386006 stopped exitcode=1>.exitcode
tests/test_multiprocess.py:35: AssertionError
----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------
Process Process-1:
Traceback (most recent call last):
File "/usr/lib64/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/usr/lib64/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/tkloczko/rpmbuild/BUILD/keyring-25.1.0/tests/test_multiprocess.py", line 20, in subprocess_get
keyring.get_password('test_app', 'test_user')
File "/home/tkloczko/rpmbuild/BUILD/keyring-25.1.0/keyring/core.py", line 56, in get_password
return get_keyring().get_password(service_name, username)
File "/home/tkloczko/rpmbuild/BUILD/keyring-25.1.0/keyring/backends/fail.py", line 28, in get_password
raise NoKeyringError(msg)
keyring.errors.NoKeyringError: No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for details.
__________________________________________________________________________ test_multiprocess_get_after_native_get ___________________________________________________________________________
def test_multiprocess_get_after_native_get():
> keyring.get_password('test_app', 'test_user')
tests/test_multiprocess.py:39:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
keyring/core.py:56: in get_password
return get_keyring().get_password(service_name, username)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <keyring.backends.fail.Keyring object at 0x7f6baeedd270>, service = 'test_app', username = 'test_user', password = None
def get_password(self, service, username, password=None):
msg = (
"No recommended backend was available. Install a recommended 3rd "
"party backend package; or, install the keyrings.alt package if "
"you want to use the non-recommended backends. See "
"https://pypi.org/project/keyring for details."
)
> raise NoKeyringError(msg)
E keyring.errors.NoKeyringError: No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for details.
keyring/backends/fail.py:28: NoKeyringError
================================================================================== short test summary info ==================================================================================
SKIPPED [1] keyring/testing/backend.py:67: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:73: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:79: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:85: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:93: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:99: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:109: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:112: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:118: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:129: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:144: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:166: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [1] keyring/testing/backend.py:172: SecretStorage package is needed for SecretServiceKeyring
SKIPPED [2] keyring/testing/backend.py:67: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:73: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:79: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:85: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:93: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:99: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:109: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:112: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:118: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:129: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:144: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:166: KWallet5 unavailable
SKIPPED [2] keyring/testing/backend.py:172: KWallet5 unavailable
SKIPPED [1] keyring/testing/backend.py:67: libsecret package is needed for LibSecretKeyring
SKIPPED [1] keyring/testing/backend.py:73: libsecret package is needed for LibSecretKeyring
SKIPPED [1] keyring/testing/backend.py:79: libsecret package is needed for LibSecretKeyring
SKIPPED [1] keyring/testing/backend.py:85: libsecret package is needed for LibSecretKeyring
SKIPPED [1] keyring/testing/backend.py:93: libsecret package is needed for LibSecretKeyring
SKIPPED [1] keyring/testing/backend.py:99: libsecret package is needed for LibSecretKeyring
SKIPPED [1] keyring/testing/backend.py:109: libsecret package is needed for LibSecretKeyring
SKIPPED [1] keyring/testing/backend.py:112: libsecret package is needed for LibSecretKeyring
SKIPPED [1] keyring/testing/backend.py:118: libsecret package is needed for LibSecretKeyring
SKIPPED [1] keyring/testing/backend.py:129: libsecret package is needed for LibSecretKeyring
SKIPPED [1] keyring/testing/backend.py:144: libsecret package is needed for LibSecretKeyring
SKIPPED [1] keyring/testing/backend.py:166: libsecret package is needed for LibSecretKeyring
SKIPPED [1] keyring/testing/backend.py:172: libsecret package is needed for LibSecretKeyring
SKIPPED [1] tests/util/test_platform.py:12: condition: platform.system() != "Windows"
XFAIL tests/test_multiprocess.py::test_multiprocess_get - #410: keyring discovery fails intermittently
XFAIL tests/test_multiprocess.py::test_multiprocess_get_after_native_get - #410: keyring discovery fails intermittently
ERROR tests/test_cli.py::test_set_interactive - AttributeError: module 'keyring' has no attribute 'cli'
ERROR tests/test_cli.py::test_set_pipe - AttributeError: module 'keyring' has no attribute 'cli'
ERROR tests/test_cli.py::test_set_pipe_newline - AttributeError: module 'keyring' has no attribute 'cli'
FAILED tests/backends/test_chainer.py::TestChainer::test_chainer_gets_from_highest_priority - AttributeError: module 'keyring.backends' has no attribute 'chainer'
FAILED tests/backends/test_chainer.py::TestChainer::test_chainer_defers_to_fail - AttributeError: module 'keyring.backends' has no attribute 'chainer'
=============================================================== 2 failed, 23 passed, 53 skipped, 2 xfailed, 3 errors in 1.55s ============================================================== |
I think this issue emerged as a result of ordering. Moving the compatibility modules meant that these implicit imports aren’t present where they were before. I’m may already have addressed this issue in main.
I’ll look later when I’m at my machine. Thanks for the report.
…Sent from my comm
Message ID: ***@***.***>
|
Those tests have always been executed on Linux - they're just skipped when not viable. What's weird is that they're now failing before they can be skipped. I think we've stumbled onto another bug in pytest's import-mode importlib, because the code is clearly importing the missing attribute: keyring/tests/backends/test_macOS.py Lines 3 to 11 in 437c167
|
But the other interesting thing is that these tests aren't failing in CI, so we'll have to ascertain what it is about your build environment that's eliciting this failure. |
I was able to replicate the failure with this Dockerfile: FROM jaraco/multipy-tox
RUN apt install -y libarchive-tools
RUN wget -O - https://github.com/jaraco/keyring/archive/refs/tags/v25.1.0.zip | bsdtar -x
WORKDIR keyring-25.1.0
RUN py -m pip install pytest
CMD py -m pytest |
If I run that dockerfile with |
If I run docker with |
I'm moving discussion of this particular failure to #676, since it's different from the original report. |
pytest never should be executed that way. All because when pyton is executed |
I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulesHere is pytest output:
The text was updated successfully, but these errors were encountered: