From 6482686264fdc39ca851f67d4fb29f82b36c6506 Mon Sep 17 00:00:00 2001 From: Linchin Date: Wed, 5 Nov 2025 00:11:52 +0000 Subject: [PATCH 1/6] test: ignore DeprecationWarning for `credentials_file` argument --- pytest.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pytest.ini b/pytest.ini index 2d8ce14b8..631adeeb5 100644 --- a/pytest.ini +++ b/pytest.ini @@ -27,3 +27,5 @@ filterwarnings = ignore:.*Please use message_factory.GetMessageClass\(\) instead. SymbolDatabase.GetPrototype\(\) will be removed soon.:UserWarning # Remove warning once https://github.com/googleapis/gapic-generator-python/issues/2046 is fixed ignore:coroutine 'AsyncMockMixin._execute_mock_call' was never awaited:RuntimeWarning + # Remove when `credentials_file` argument is removed + ignore:The `credentials_file` argument is deprecated:DeprecationWarning From 7bda8926b0b1cf17cb4bec4685b5eb9e252dc1c8 Mon Sep 17 00:00:00 2001 From: Linchin Date: Wed, 5 Nov 2025 18:31:28 +0000 Subject: [PATCH 2/6] add more ignores --- pytest.ini | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pytest.ini b/pytest.ini index 631adeeb5..afaed0359 100644 --- a/pytest.ini +++ b/pytest.ini @@ -9,17 +9,22 @@ filterwarnings = ignore:.*pkg_resources is deprecated as an API:DeprecationWarning # Remove warning once https://github.com/grpc/grpc/issues/35974 is fixed ignore:unclosed:ResourceWarning - # Remove after support for Python 3.7 is dropped - ignore:After January 1, 2024, new releases of this library will drop support for Python 3.7:DeprecationWarning # Remove warning once https://github.com/googleapis/gapic-generator-python/issues/1939 is fixed ignore:get_mtls_endpoint_and_cert_source is deprecated.:DeprecationWarning # DeprecationWarnings triggered by Flask 1.0 testing by Flask dependencies in test code - # 3.7 deprecation warnings + ignore:Importing 'itsdangerous.json' is deprecated and will be removed in ItsDangerous 2.1:DeprecationWarning + # 3.7 deprecation warnings, remove after support for Python 3.7 is dropped + ignore:After January 1, 2024, new releases of this library will drop support for Python 3.7:DeprecationWarning ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working:DeprecationWarning - # 3.8 - 3.9 deprecation warnings - ignore:Importing 'itsdangerous.json' is deprecated and will be removed in ItsDangerous 2.1. Use Python's 'json' module instead.:DeprecationWarning + ignore:You are using a non-supported Python version \(3\.7:FutureWarning + # 3.8 deprecation warnings, remove after support for Python 3.8 is dropped + ignore:You are using a non-supported Python version \(3\.8:FutureWarning + # 3.9 deprecation warnings, remove after support for Python 3.9 is dropped + ignore:: You are using a Python version \(3\.9:FutureWarning + # 3.10 deprecation warnings, remove after support for Python 3.10 is dropped + ignore:: You are using a Python version \(3\.10:FutureWarning ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working:DeprecationWarning - # 3.12 deprecation warnings + # 3.12 deprecation warnings, remove after support for Python 3.12 is dropped ignore:Attribute s is deprecated and will be removed in Python 3.14; use value instead:DeprecationWarning ignore:ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead:DeprecationWarning ignore:'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec\(\) instead:DeprecationWarning From 7be3645df9d47bd49737964d2ab64bad637629ab Mon Sep 17 00:00:00 2001 From: Linchin Date: Wed, 5 Nov 2025 18:36:12 +0000 Subject: [PATCH 3/6] typo --- pytest.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytest.ini b/pytest.ini index afaed0359..0c4ae7816 100644 --- a/pytest.ini +++ b/pytest.ini @@ -20,9 +20,9 @@ filterwarnings = # 3.8 deprecation warnings, remove after support for Python 3.8 is dropped ignore:You are using a non-supported Python version \(3\.8:FutureWarning # 3.9 deprecation warnings, remove after support for Python 3.9 is dropped - ignore:: You are using a Python version \(3\.9:FutureWarning + ignore:You are using a Python version \(3\.9:FutureWarning # 3.10 deprecation warnings, remove after support for Python 3.10 is dropped - ignore:: You are using a Python version \(3\.10:FutureWarning + ignore:You are using a Python version \(3\.10:FutureWarning ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working:DeprecationWarning # 3.12 deprecation warnings, remove after support for Python 3.12 is dropped ignore:Attribute s is deprecated and will be removed in Python 3.14; use value instead:DeprecationWarning From 86123856d4f47e02050ca300092cebbe846e8731 Mon Sep 17 00:00:00 2001 From: Linchin Date: Wed, 5 Nov 2025 18:46:38 +0000 Subject: [PATCH 4/6] add ignore --- pytest.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pytest.ini b/pytest.ini index 0c4ae7816..126bafe93 100644 --- a/pytest.ini +++ b/pytest.ini @@ -34,3 +34,5 @@ filterwarnings = ignore:coroutine 'AsyncMockMixin._execute_mock_call' was never awaited:RuntimeWarning # Remove when `credentials_file` argument is removed ignore:The `credentials_file` argument is deprecated:DeprecationWarning + # Remove when load_credentials_from_file method is removed + ignore:The load_credentials_from_file method is deprecated:DeprecationWarning From 43713f6d4e9ac7a401b5b8fb018f599a76c6a0d6 Mon Sep 17 00:00:00 2001 From: Linchin Date: Wed, 5 Nov 2025 19:51:03 +0000 Subject: [PATCH 5/6] remove python 3.7 and 3.8 from kokoro unit test --- noxfile.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index b75e78ac3..9752d5a08 100644 --- a/noxfile.py +++ b/noxfile.py @@ -35,8 +35,6 @@ DEFAULT_PYTHON_VERSION = "3.8" UNIT_TEST_PYTHON_VERSIONS: List[str] = [ - "3.7", - "3.8", "3.9", "3.10", "3.11", From 5e1b8acd6eaabe7905fdb92dece19fcf6600ef6c Mon Sep 17 00:00:00 2001 From: Linchin Date: Wed, 5 Nov 2025 23:16:14 +0000 Subject: [PATCH 6/6] change DEFAULT_PYTHON_VERSION to 3.10 --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 9752d5a08..e71504756 100644 --- a/noxfile.py +++ b/noxfile.py @@ -32,7 +32,7 @@ ISORT_VERSION = "isort==5.11.0" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.8" +DEFAULT_PYTHON_VERSION = "3.10" UNIT_TEST_PYTHON_VERSIONS: List[str] = [ "3.9",