Skip to content

Commit d380f69

Browse files
committed
Filter warning about gencode version being one version older
Protobuf guarantees 2 consecutive major versions work together, and we need to do this while transitioning to new major versions, so the warning is not providing any useful information or anything we can act on, so it is better to ignore it. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
1 parent 803f7aa commit d380f69

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,18 @@ disable = [
168168
]
169169

170170
[tool.pytest.ini_options]
171-
addopts = "-W=all -Werror -Wdefault::DeprecationWarning -Wdefault::PendingDeprecationWarning -vv"
171+
addopts = "-vv"
172+
filterwarnings = [
173+
"error",
174+
"once::DeprecationWarning",
175+
"once::PendingDeprecationWarning",
176+
# We ignore warnings about protobuf gencode version being one version older
177+
# than the current version, as this is supported by protobuf, and we expect to
178+
# have such cases. If we go too far, we will get a proper error anyways.
179+
# We use a raw string (single quotes) to avoid the need to escape special
180+
# characters as this is a regex.
181+
'ignore:Protobuf gencode version .*exactly one major version older.*:UserWarning',
182+
]
172183
testpaths = ["pytests"]
173184

174185
[tool.mypy]

0 commit comments

Comments
 (0)