Skip to content

Commit c1385b2

Browse files
authored
chore: filter warnings for end of life Python (#14858)
This PR is needed to resolve the following errors when running tests with end of life Python versions and treating warnings as errors. ``` ========================================================================= ERRORS ========================================================================== ____________________________________________ ERROR collecting tests/unit/gapic/orgpolicy_v2/test_org_policy.py ____________________________________________ tests/unit/gapic/orgpolicy_v2/test_org_policy.py:29: in <module> from google.api_core import api_core_version .nox/unit-3-9-protobuf_implementation-python/lib/python3.9/site-packages/google/api_core/__init__.py:39: in <module> check_python_version(package="google.api_core") .nox/unit-3-9-protobuf_implementation-python/lib/python3.9/site-packages/google/api_core/_python_version_support.py:252: in check_python_version warnings.warn(message, FutureWarning) E FutureWarning: You are using a Python version (3.9.16) past its end of life. Google will update google.api_core with critical bug fixes on a best-effort basis, but not with any other fixes or features. Please upgrade to the latest Python version, or at least Python 3.10, and then update google.api_core. ``` ``` ========================================================================= ERRORS ========================================================================== ____________________________________________ ERROR collecting tests/unit/gapic/orgpolicy_v2/test_org_policy.py ____________________________________________ tests/unit/gapic/orgpolicy_v2/test_org_policy.py:29: in <module> from google.api_core import api_core_version .nox/unit-3-8-protobuf_implementation-python/lib/python3.8/site-packages/google/api_core/__init__.py:39: in <module> check_python_version(package="google.api_core") .nox/unit-3-8-protobuf_implementation-python/lib/python3.8/site-packages/google/api_core/_python_version_support.py:237: in check_python_version warnings.warn(message, FutureWarning) E FutureWarning: You are using a non-supported Python version (3.8.16). Google will not post any further updates to google.api_core supporting this Python version. Please upgrade to the latest Python version, or at least Python 3.10, and then update google.api_core. ```
1 parent 0747902 commit c1385b2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/google-cloud-org-policy/pytest.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ filterwarnings =
2020
ignore:unclosed:ResourceWarning
2121
# Remove after support for Python 3.7 is dropped
2222
ignore:After January 1, 2024, new releases of this library will drop support for Python 3.7:DeprecationWarning
23+
# Warnings emitted when testing end of life Python versions
24+
ignore:You are using a non-supported Python version:FutureWarning
25+
ignore:.*Please upgrade to the latest Python version:FutureWarning
2326
# Remove warning once https://github.com/googleapis/google-cloud-python/issues/12873 is fixed
2427
ignore:Using the synchronous google.api_core.retry.Retry with asynchronous calls may lead to unexpected results:UserWarning
2528
# Remove after support for `credentials_file` is dropped in `google-auth` and `gapic-generator`

0 commit comments

Comments
 (0)