Skip to content

Commit

Permalink
build: treat warnings as errors (#237)
Browse files Browse the repository at this point in the history
* build: treat warnings as errors

* ignore warnings from googleapis-common-protos

* remove grpc from system test which is not used in this library
  • Loading branch information
parthea authored Nov 30, 2023
1 parent 6c64ed0 commit 5a8b4f2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
5 changes: 0 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,6 @@ def unit(session):


def install_systemtest_dependencies(session, *constraints):
# Use pre-release gRPC for system tests.
# Exclude version 1.52.0rc1 which has a known issue.
# See https://github.com/grpc/grpc/issues/32163
session.install("--pre", "grpcio!=1.52.0rc1")

session.install(*SYSTEM_TEST_STANDARD_DEPENDENCIES, *constraints)

if SYSTEM_TEST_EXTERNAL_DEPENDENCIES:
Expand Down
8 changes: 8 additions & 0 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,13 @@

python.py_samples(skip_readmes=True)

s.replace(
"noxfile.py",
""" # Use pre-release gRPC for system tests.
# Exclude version 1.52.0rc1 which has a known issue.
# See https://github.com/grpc/grpc/issues/32163
session.install\("--pre", "grpcio!=1.52.0rc1"\)""",
""
)
s.shell.run(["nox", "-s", "blacken"], hide_output=False)

11 changes: 11 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[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 https://github.com/googleapis/python-cloud-core/issues/259 is fixed
ignore:datetime.datetime.utcnow\(\) is deprecated:DeprecationWarning
# Remove once https://github.com/googleapis/python-api-common-protos/pull/187/files is merged
ignore:.*pkg_resources.declare_namespace:DeprecationWarning
ignore:.*pkg_resources is deprecated as an API:DeprecationWarning

0 comments on commit 5a8b4f2

Please sign in to comment.