From c89b9a4e85457ce3c3626302f263d517e4ac8413 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 2 Jun 2025 10:50:09 +0200 Subject: [PATCH] Avoid warnings about protobuf gencode version We know about this warning and it is not a problem for us, as protobuf gurantees compatibility between two consecutive major versions. When we really need to bump the dependency, we'll get an error that is not ignored. Signed-off-by: Leandro Lucarella --- pyproject.toml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 77f122e6..aa16ac69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -140,7 +140,15 @@ disable = [ [tool.pytest.ini_options] testpaths = ["pytests"] -addopts = "-W=all -Werror -Wdefault::DeprecationWarning -Wdefault::PendingDeprecationWarning -vv" +addopts = "-vv" +filterwarnings = [ + "error", + "once::DeprecationWarning", + "once::PendingDeprecationWarning", + # We use a raw string (single quote) to avoid the need to escape special + # chars as this is a regex + 'ignore:Protobuf gencode version .*exactly one major version older.*:UserWarning', +] [tool.mypy] explicit_package_bases = true