Skip to content

Commit 5a8b4f2

Browse files
authored
build: treat warnings as errors (#237)
* build: treat warnings as errors * ignore warnings from googleapis-common-protos * remove grpc from system test which is not used in this library
1 parent 6c64ed0 commit 5a8b4f2

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

noxfile.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,6 @@ def unit(session):
190190

191191

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

200195
if SYSTEM_TEST_EXTERNAL_DEPENDENCIES:

owlbot.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,13 @@
3232

3333
python.py_samples(skip_readmes=True)
3434

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

pytest.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[pytest]
2+
filterwarnings =
3+
# treat all warnings as errors
4+
error
5+
# Remove once https://github.com/protocolbuffers/protobuf/issues/12186 is fixed
6+
ignore:.*custom tp_new.*in Python 3.14:DeprecationWarning
7+
# Remove once https://github.com/googleapis/python-cloud-core/issues/259 is fixed
8+
ignore:datetime.datetime.utcnow\(\) is deprecated:DeprecationWarning
9+
# Remove once https://github.com/googleapis/python-api-common-protos/pull/187/files is merged
10+
ignore:.*pkg_resources.declare_namespace:DeprecationWarning
11+
ignore:.*pkg_resources is deprecated as an API:DeprecationWarning

0 commit comments

Comments
 (0)