From 89725e358407c56aaa12d5f526419771be38e049 Mon Sep 17 00:00:00 2001 From: weeping Date: Mon, 26 Jan 2026 15:20:14 +0800 Subject: [PATCH 1/2] fix: rm :=, support py3.7 --- alibabacloud_credentials/provider/cli_profile.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/alibabacloud_credentials/provider/cli_profile.py b/alibabacloud_credentials/provider/cli_profile.py index b7c52af..e04cef4 100644 --- a/alibabacloud_credentials/provider/cli_profile.py +++ b/alibabacloud_credentials/provider/cli_profile.py @@ -248,8 +248,10 @@ def _find_source_oauth_profile(config: dict, profile_name: str) -> dict: if profile.get('mode') == 'OAuth': return profile - elif source_profile := profile.get('source_profile'): - return _find_source_oauth_profile(config, source_profile) + else: + source_profile = profile.get('source_profile') + if source_profile: + return _find_source_oauth_profile(config, source_profile) raise CredentialException(f"unable to get OAuth profile with name '{profile_name}' from cli credentials file.") @@ -563,8 +565,10 @@ def _find_source_oauth_profile(config: dict, profile_name: str) -> dict: if profile.get('mode') == 'OAuth': return profile - elif source_profile := profile.get('source_profile'): - return _find_source_oauth_profile(config, source_profile) + else: + source_profile = profile.get('source_profile') + if source_profile: + return _find_source_oauth_profile(config, source_profile) raise CredentialException(f"unable to get OAuth profile with name '{profile_name}' from cli credentials file.") From 0830bbc3fbf1934b79e99a44ada8a2307e609d10 Mon Sep 17 00:00:00 2001 From: weeping Date: Mon, 26 Jan 2026 15:21:10 +0800 Subject: [PATCH 2/2] Bump 1.0.6 --- alibabacloud_credentials/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alibabacloud_credentials/__init__.py b/alibabacloud_credentials/__init__.py index 8d33675..b71b329 100644 --- a/alibabacloud_credentials/__init__.py +++ b/alibabacloud_credentials/__init__.py @@ -1 +1 @@ -__version__ = "1.0.5" +__version__ = "1.0.6"