From c5adc091271acf67d2241602c754dc734d91c3e6 Mon Sep 17 00:00:00 2001 From: Emmanuel Ferdman Date: Tue, 3 Jun 2025 09:47:51 +0300 Subject: [PATCH] test: fix: resolve Python Logger warnings (#41827) # PR Summary This PR resolves the deprecation warnings of the `logger` library: ```python DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead ``` Signed-off-by: Emmanuel Ferdman --- tests/python_client/chaos/checker.py | 2 +- .../testcases/test_concurrent_operation_for_multi_tenancy.py | 2 +- tests/python_client/testcases/test_concurrent.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/python_client/chaos/checker.py b/tests/python_client/chaos/checker.py index 58eab3e2a0..a358e031e5 100644 --- a/tests/python_client/chaos/checker.py +++ b/tests/python_client/chaos/checker.py @@ -38,7 +38,7 @@ def get_chaos_info(): with open(constants.CHAOS_INFO_SAVE_PATH, 'r') as f: chaos_info = json.load(f) except Exception as e: - log.warn(f"get_chaos_info error: {e}") + log.warning(f"get_chaos_info error: {e}") return None return chaos_info diff --git a/tests/python_client/chaos/testcases/test_concurrent_operation_for_multi_tenancy.py b/tests/python_client/chaos/testcases/test_concurrent_operation_for_multi_tenancy.py index 075930d904..e524efeb5e 100644 --- a/tests/python_client/chaos/testcases/test_concurrent_operation_for_multi_tenancy.py +++ b/tests/python_client/chaos/testcases/test_concurrent_operation_for_multi_tenancy.py @@ -24,7 +24,7 @@ def get_all_collections(): data = json.load(f) all_collections = data["all"] except Exception as e: - log.warn(f"get_all_collections error: {e}") + log.warning(f"get_all_collections error: {e}") return [None] return all_collections diff --git a/tests/python_client/testcases/test_concurrent.py b/tests/python_client/testcases/test_concurrent.py index f881d68d43..9565616f6e 100644 --- a/tests/python_client/testcases/test_concurrent.py +++ b/tests/python_client/testcases/test_concurrent.py @@ -27,7 +27,7 @@ def get_all_collections(): data = json.load(f) all_collections = data["all"] except Exception as e: - log.warn(f"get_all_collections error: {e}") + log.warning(f"get_all_collections error: {e}") return [None] return all_collections