From 645692e674e56003cb3010773e4613cbe8a4cfbb Mon Sep 17 00:00:00 2001 From: Adam Zalcman <40255865+viathor@users.noreply.github.com> Date: Wed, 15 Dec 2021 17:02:19 -0800 Subject: [PATCH] Ignore deprecation warnings from protobufs (#4751) --- conftest.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/conftest.py b/conftest.py index 265a447d02c..e74e741ee54 100644 --- a/conftest.py +++ b/conftest.py @@ -13,6 +13,21 @@ # limitations under the License. +def pytest_configure(config): + # Ignore deprecation warnings in python code generated from our protobuf definitions. + # Eventually, the warnings will be removed by upgrading protoc compiler. See issues + # #4161 and #4737. + for f in ( + "FieldDescriptor", + "Descriptor", + "EnumDescriptor", + "EnumValueDescriptor", + "FileDescriptor", + "OneofDescriptor", + ): + config.addinivalue_line("filterwarnings", f"ignore:Call to deprecated create function {f}") + + def pytest_addoption(parser): parser.addoption( "--rigetti-integration",