Skip to content

Commit

Permalink
build: treat warnings as errors
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea committed Nov 28, 2023
1 parent 4b77019 commit a1c5616
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gapic/ads-templates/pytest.ini
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions gapic/templates/pytest.ini
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a1c5616

Please sign in to comment.