From 803f7aa373cb1a9a455ad347d47dea92a5e02dd0 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Thu, 5 Jun 2025 09:10:07 +0200 Subject: [PATCH 1/2] Bump protobuf and grpcio to 6.31.1 and 1.72.1 respectively Signed-off-by: Leandro Lucarella --- RELEASE_NOTES.md | 2 +- pyproject.toml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 56f7704..a0e2923 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -6,7 +6,7 @@ ## Upgrading - +- The minimum allowed version of `protobuf` and `grpcio` has been updated to 6.31.1 and 1.72.1 respectively, you might also need to bump your dependencies accordingly. ## New Features - Two new RPCs have been added to support sensor data: diff --git a/pyproject.toml b/pyproject.toml index 44fa18e..61ed600 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,9 +10,9 @@ requires = [ # sure the code is generated using the minimum supported versions, as older # versions can't work with code that was generated with newer versions. # https://protobuf.dev/support/cross-version-runtime-guarantee/#backwards - "protobuf == 5.29.3", - "grpcio-tools == 1.70.0", - "grpcio == 1.70.0", + "protobuf == 6.31.1", + "grpcio-tools == 1.72.1", + "grpcio == 1.72.1", ] build-backend = "setuptools.build_meta" @@ -48,11 +48,11 @@ dependencies = [ # We can't widen beyond the current value unless we bump the minimum # requirements too because of protobuf cross-version runtime guarantees: # https://protobuf.dev/support/cross-version-runtime-guarantee/#major - "protobuf >= 5.29.3, < 7", # Do not widen beyond 7! + "protobuf >= 6.31.1, < 8", # Do not widen beyond 8! # We couldn't find any document with a spec about the cross-version runtime # guarantee for grpcio, so unless we find one in the future, we'll assume # major version jumps are not compatible - "grpcio >= 1.70.0, < 2", # Do not widen beyond 2! + "grpcio >= 1.72.1, < 2", # Do not widen beyond 2! ] dynamic = ["version"] From d380f693f3850b9b6a05f5f02ffe3d72011bb5a0 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Thu, 5 Jun 2025 09:17:08 +0200 Subject: [PATCH 2/2] 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 --- pyproject.toml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 61ed600..29fe434 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -168,7 +168,18 @@ disable = [ ] [tool.pytest.ini_options] -addopts = "-W=all -Werror -Wdefault::DeprecationWarning -Wdefault::PendingDeprecationWarning -vv" +addopts = "-vv" +filterwarnings = [ + "error", + "once::DeprecationWarning", + "once::PendingDeprecationWarning", + # We ignore warnings about protobuf gencode version being one version older + # than the current version, as this is supported by protobuf, and we expect to + # have such cases. If we go too far, we will get a proper error anyways. + # We use a raw string (single quotes) to avoid the need to escape special + # characters as this is a regex. + 'ignore:Protobuf gencode version .*exactly one major version older.*:UserWarning', +] testpaths = ["pytests"] [tool.mypy]