Skip to content

Commit a7a28d1

Browse files
authored
test: ignore DeprecationWarning for credentials_file argument and Python versions (#1058)
* test: ignore DeprecationWarning for `credentials_file` argument * add more ignores * typo * add ignore * remove python 3.7 and 3.8 from kokoro unit test * change DEFAULT_PYTHON_VERSION to 3.10
1 parent 70f612c commit a7a28d1

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

noxfile.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,9 @@
3232
ISORT_VERSION = "isort==5.11.0"
3333
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
3434

35-
DEFAULT_PYTHON_VERSION = "3.8"
35+
DEFAULT_PYTHON_VERSION = "3.10"
3636

3737
UNIT_TEST_PYTHON_VERSIONS: List[str] = [
38-
"3.7",
39-
"3.8",
4038
"3.9",
4139
"3.10",
4240
"3.11",

pytest.ini

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,30 @@ filterwarnings =
99
ignore:.*pkg_resources is deprecated as an API:DeprecationWarning
1010
# Remove warning once https://github.com/grpc/grpc/issues/35974 is fixed
1111
ignore:unclosed:ResourceWarning
12-
# Remove after support for Python 3.7 is dropped
13-
ignore:After January 1, 2024, new releases of this library will drop support for Python 3.7:DeprecationWarning
1412
# Remove warning once https://github.com/googleapis/gapic-generator-python/issues/1939 is fixed
1513
ignore:get_mtls_endpoint_and_cert_source is deprecated.:DeprecationWarning
1614
# DeprecationWarnings triggered by Flask 1.0 testing by Flask dependencies in test code
17-
# 3.7 deprecation warnings
15+
ignore:Importing 'itsdangerous.json' is deprecated and will be removed in ItsDangerous 2.1:DeprecationWarning
16+
# 3.7 deprecation warnings, remove after support for Python 3.7 is dropped
17+
ignore:After January 1, 2024, new releases of this library will drop support for Python 3.7:DeprecationWarning
1818
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
19-
# 3.8 - 3.9 deprecation warnings
20-
ignore:Importing 'itsdangerous.json' is deprecated and will be removed in ItsDangerous 2.1. Use Python's 'json' module instead.:DeprecationWarning
19+
ignore:You are using a non-supported Python version \(3\.7:FutureWarning
20+
# 3.8 deprecation warnings, remove after support for Python 3.8 is dropped
21+
ignore:You are using a non-supported Python version \(3\.8:FutureWarning
22+
# 3.9 deprecation warnings, remove after support for Python 3.9 is dropped
23+
ignore:You are using a Python version \(3\.9:FutureWarning
24+
# 3.10 deprecation warnings, remove after support for Python 3.10 is dropped
25+
ignore:You are using a Python version \(3\.10:FutureWarning
2126
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
22-
# 3.12 deprecation warnings
27+
# 3.12 deprecation warnings, remove after support for Python 3.12 is dropped
2328
ignore:Attribute s is deprecated and will be removed in Python 3.14; use value instead:DeprecationWarning
2429
ignore:ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead:DeprecationWarning
2530
ignore:'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14; use importlib.util.find_spec\(\) instead:DeprecationWarning
2631
# Remove warning once https://github.com/protocolbuffers/protobuf/issues/17345 is fixed
2732
ignore:.*Please use message_factory.GetMessageClass\(\) instead. SymbolDatabase.GetPrototype\(\) will be removed soon.:UserWarning
2833
# Remove warning once https://github.com/googleapis/gapic-generator-python/issues/2046 is fixed
2934
ignore:coroutine 'AsyncMockMixin._execute_mock_call' was never awaited:RuntimeWarning
35+
# Remove when `credentials_file` argument is removed
36+
ignore:The `credentials_file` argument is deprecated:DeprecationWarning
37+
# Remove when load_credentials_from_file method is removed
38+
ignore:The load_credentials_from_file method is deprecated:DeprecationWarning

0 commit comments

Comments
 (0)