diff -Nru python-keyring-18.0.1/debian/changelog python-keyring-18.0.1/debian/changelog --- python-keyring-18.0.1/debian/changelog 2019-09-03 15:19:00.000000000 +0000 +++ python-keyring-18.0.1/debian/changelog 2020-03-14 11:45:55.000000000 +0000 @@ -1,3 +1,13 @@ +python-keyring (18.0.1-1ubuntu1) eoan; urgency=medium + + * d/p/lp1864204/0001-correct-docstring-for-KeyringLocked-class.patch, + d/p/lp1864204/0002-add-NoKeyringError-and-change-backends-fail-to-use-i.patch, + d/p/lp1864204/0003-lower-empty-backends-chain-priority-to-10.-Ref-372.patch: + - make failure deterministic when no keyring backends are available + (LP: #1864204) + + -- Dan Streetman Sat, 14 Mar 2020 07:45:55 -0400 + python-keyring (18.0.1-1) unstable; urgency=medium [ Ondřej Nový ] diff -Nru python-keyring-18.0.1/debian/patches/lp1864204/0001-correct-docstring-for-KeyringLocked-class.patch python-keyring-18.0.1/debian/patches/lp1864204/0001-correct-docstring-for-KeyringLocked-class.patch --- python-keyring-18.0.1/debian/patches/lp1864204/0001-correct-docstring-for-KeyringLocked-class.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-keyring-18.0.1/debian/patches/lp1864204/0001-correct-docstring-for-KeyringLocked-class.patch 2020-03-14 11:45:55.000000000 +0000 @@ -0,0 +1,28 @@ +From deaee894589a2247b9322ba5cdb94e4c127c35bd Mon Sep 17 00:00:00 2001 +From: Dan Streetman +Date: Fri, 21 Feb 2020 10:11:56 -0500 +Subject: [PATCH 1/3] correct docstring for KeyringLocked class +Bug: https://github.com/jaraco/keyring/issues/372 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-keyring/+bug/1864204 +Origin: upstream, https://github.com/jaraco/keyring/pull/424 + +--- + keyring/errors.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/keyring/errors.py b/keyring/errors.py +index 0e3ff3b..a0cff4e 100644 +--- a/keyring/errors.py ++++ b/keyring/errors.py +@@ -25,7 +25,7 @@ class InitError(KeyringError): + + + class KeyringLocked(KeyringError): +- """Raised when the keyring could not be initialised ++ """Raised when the keyring failed unlocking + """ + + +-- +2.25.1 + diff -Nru python-keyring-18.0.1/debian/patches/lp1864204/0002-add-NoKeyringError-and-change-backends-fail-to-use-i.patch python-keyring-18.0.1/debian/patches/lp1864204/0002-add-NoKeyringError-and-change-backends-fail-to-use-i.patch --- python-keyring-18.0.1/debian/patches/lp1864204/0002-add-NoKeyringError-and-change-backends-fail-to-use-i.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-keyring-18.0.1/debian/patches/lp1864204/0002-add-NoKeyringError-and-change-backends-fail-to-use-i.patch 2020-03-14 11:45:55.000000000 +0000 @@ -0,0 +1,59 @@ +From 8cd86e52adde979c7d14ff5e15b855e6b3d5029a Mon Sep 17 00:00:00 2001 +From: Dan Streetman +Date: Fri, 21 Feb 2020 10:14:28 -0500 +Subject: [PATCH 2/3] add NoKeyringError and change backends/fail to use it +Bug: https://github.com/jaraco/keyring/issues/372 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-keyring/+bug/1864204 +Origin: upstream, https://github.com/jaraco/keyring/pull/424 + +--- + keyring/backends/fail.py | 5 +++-- + keyring/errors.py | 5 +++++ + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/keyring/backends/fail.py b/keyring/backends/fail.py +index d1cf612..d0bfb16 100644 +--- a/keyring/backends/fail.py ++++ b/keyring/backends/fail.py +@@ -1,4 +1,5 @@ + from ..backend import KeyringBackend ++from ..errors import NoKeyringError + + + class Keyring(KeyringBackend): +@@ -9,7 +10,7 @@ class Keyring(KeyringBackend): + >>> kr.get_password('svc', 'user') + Traceback (most recent call last): + ... +- RuntimeError: ...No recommended backend... ++ keyring.errors.NoKeyringError: ...No recommended backend... + """ + + priority = 0 +@@ -21,6 +22,6 @@ class Keyring(KeyringBackend): + "you want to use the non-recommended backends. See " + "https://pypi.org/project/keyring for details." + ) +- raise RuntimeError(msg) ++ raise NoKeyringError(msg) + + set_password = delete_password = get_password +diff --git a/keyring/errors.py b/keyring/errors.py +index a0cff4e..7dc83ed 100644 +--- a/keyring/errors.py ++++ b/keyring/errors.py +@@ -29,6 +29,11 @@ class KeyringLocked(KeyringError): + """ + + ++class NoKeyringError(KeyringError, RuntimeError): ++ """Raised when there is no keyring backend ++ """ ++ ++ + class ExceptionRaisedContext: + """ + An exception-trapping context that indicates whether an exception was +-- +2.25.1 + diff -Nru python-keyring-18.0.1/debian/patches/lp1864204/0003-lower-empty-backends-chain-priority-to-10.-Ref-372.patch python-keyring-18.0.1/debian/patches/lp1864204/0003-lower-empty-backends-chain-priority-to-10.-Ref-372.patch --- python-keyring-18.0.1/debian/patches/lp1864204/0003-lower-empty-backends-chain-priority-to-10.-Ref-372.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-keyring-18.0.1/debian/patches/lp1864204/0003-lower-empty-backends-chain-priority-to-10.-Ref-372.patch 2020-03-14 11:45:55.000000000 +0000 @@ -0,0 +1,28 @@ +From 12b086b7cdffde0ef21c766b8ad6afcd54e18ea1 Mon Sep 17 00:00:00 2001 +From: Dan Streetman +Date: Fri, 21 Feb 2020 11:39:45 -0500 +Subject: [PATCH 3/3] lower empty backends/chain priority to -10. Ref #372 +Bug: https://github.com/jaraco/keyring/issues/372 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-keyring/+bug/1864204 +Origin: upstream, https://github.com/jaraco/keyring/pull/424 + +--- + keyring/backends/chainer.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/keyring/backends/chainer.py ++++ b/keyring/backends/chainer.py +@@ -23,9 +23,11 @@ class ChainerBackend(backend.KeyringBack + @classmethod + def priority(cls): + """ +- High-priority if there are backends to chain, otherwise 0. ++ If there are backends to chain, high priority ++ Otherwise very low priority since our operation when empty ++ is the same as null. + """ +- return 10 * (len(cls.backends) > 1) ++ return 10 if len(cls.backends) > 1 else -10 + + @properties.ClassProperty + @classmethod diff -Nru python-keyring-18.0.1/debian/patches/series python-keyring-18.0.1/debian/patches/series --- python-keyring-18.0.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ python-keyring-18.0.1/debian/patches/series 2020-03-14 11:45:55.000000000 +0000 @@ -0,0 +1,3 @@ +lp1864204/0001-correct-docstring-for-KeyringLocked-class.patch +lp1864204/0002-add-NoKeyringError-and-change-backends-fail-to-use-i.patch +lp1864204/0003-lower-empty-backends-chain-priority-to-10.-Ref-372.patch