From a1c5616218589fdb84498522fc4de7e625509194 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 28 Nov 2023 15:21:29 +0000 Subject: [PATCH] build: treat warnings as errors --- gapic/ads-templates/pytest.ini | 8 ++++++++ gapic/templates/pytest.ini | 8 ++++++++ pytest.ini | 17 +++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 gapic/ads-templates/pytest.ini create mode 100644 gapic/templates/pytest.ini create mode 100644 pytest.ini diff --git a/gapic/ads-templates/pytest.ini b/gapic/ads-templates/pytest.ini new file mode 100644 index 0000000000..bd9fa3639f --- /dev/null +++ b/gapic/ads-templates/pytest.ini @@ -0,0 +1,8 @@ +[pytest] +filterwarnings = + # treat all warnings as errors + error + # Remove once https://github.com/protocolbuffers/protobuf/issues/12186 is fixed + ignore:.*custom tp_new.*in Python 3.14:DeprecationWarning + # Remove once release PR https://github.com/googleapis/proto-plus-python/pull/391 is merged + ignore:datetime.datetime.utcfromtimestamp\(\) is deprecated:DeprecationWarning:proto.datetime_helpers diff --git a/gapic/templates/pytest.ini b/gapic/templates/pytest.ini new file mode 100644 index 0000000000..bd9fa3639f --- /dev/null +++ b/gapic/templates/pytest.ini @@ -0,0 +1,8 @@ +[pytest] +filterwarnings = + # treat all warnings as errors + error + # Remove once https://github.com/protocolbuffers/protobuf/issues/12186 is fixed + ignore:.*custom tp_new.*in Python 3.14:DeprecationWarning + # Remove once release PR https://github.com/googleapis/proto-plus-python/pull/391 is merged + ignore:datetime.datetime.utcfromtimestamp\(\) is deprecated:DeprecationWarning:proto.datetime_helpers diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000000..2bf2ecd65c --- /dev/null +++ b/pytest.ini @@ -0,0 +1,17 @@ +[pytest] +filterwarnings = + # treat all warnings as errors + error + # Remove once https://github.com/pytest-dev/pytest-cov/issues/621 is fixed + ignore:.*The --rsyncdir command line argument and rsyncdirs config variable are deprecated:DeprecationWarning + # Remove once https://github.com/protocolbuffers/protobuf/issues/12186 is fixed + ignore:.*custom tp_new.*in Python 3.14:DeprecationWarning + # Remove once release PR https://github.com/googleapis/python-api-common-protos/pull/191 is merged + ignore:.*pkg_resources.declare_namespace:DeprecationWarning + ignore:.*pkg_resources is deprecated as an API:DeprecationWarning + # Remove once release PR https://github.com/googleapis/proto-plus-python/pull/391 is merged + ignore:datetime.datetime.utcfromtimestamp\(\) is deprecated:DeprecationWarning:proto.datetime_helpers + # Remove once release PR https://github.com/googleapis/python-api-core/pull/555 is merged + ignore:datetime.datetime.utcnow\(\) is deprecated:DeprecationWarning:google.api_core.datetime_helpers + # Remove once https://github.com/googleapis/gapic-generator-python/issues/1876 is fized + ignore:pytest-asyncio detected an unclosed event loop when tearing down the event_loop:DeprecationWarning