From 1c806199a4d17f992387e38bb1818b43a923c1a2 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 8 Apr 2021 14:08:35 +0200 Subject: [PATCH 1/2] Explicitly give keyring backend on Mac too. CURA-7180 --- cura/OAuth2/KeyringAttribute.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cura/OAuth2/KeyringAttribute.py b/cura/OAuth2/KeyringAttribute.py index 1d5bfaba3a..8f489dc773 100644 --- a/cura/OAuth2/KeyringAttribute.py +++ b/cura/OAuth2/KeyringAttribute.py @@ -18,6 +18,9 @@ if Platform.isWindows() and hasattr(sys, "frozen"): import win32timezone from keyring.backends.Windows import WinVaultKeyring keyring.set_keyring(WinVaultKeyring()) +if Platform.isOSX() and hasattr(sys, "frozen"): + from keyring.backends.OS_X import Keyring + keyring.set_keyring(Keyring()) # Even if errors happen, we don't want this stored locally: DONT_EVER_STORE_LOCALLY: List[str] = ["refresh_token"] From fe2d554ec0d10ec5bdff1407e7c16f33105e73b9 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Fri, 9 Apr 2021 17:14:32 +0200 Subject: [PATCH 2/2] Change the OS_X keyring backend module to macOS Since the OS_X has been deprecated since keyring v22.0.0 and has been replaced by the macOS. CURA-7180 --- cura/OAuth2/KeyringAttribute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/OAuth2/KeyringAttribute.py b/cura/OAuth2/KeyringAttribute.py index 8f489dc773..351cdf4574 100644 --- a/cura/OAuth2/KeyringAttribute.py +++ b/cura/OAuth2/KeyringAttribute.py @@ -19,7 +19,7 @@ if Platform.isWindows() and hasattr(sys, "frozen"): from keyring.backends.Windows import WinVaultKeyring keyring.set_keyring(WinVaultKeyring()) if Platform.isOSX() and hasattr(sys, "frozen"): - from keyring.backends.OS_X import Keyring + from keyring.backends.macOS import Keyring keyring.set_keyring(Keyring()) # Even if errors happen, we don't want this stored locally: