From 839ea42c99264904c81a1c9650b7de94d3635d5a Mon Sep 17 00:00:00 2001 From: Abderrahim Kitouni Date: Mon, 2 Jun 2025 08:36:00 +0100 Subject: [PATCH 1/2] sync protobuf requirements with the grpcio-tools version used See 2ac8444383b20e31b222b88ad1f466ae354a9992 --- requirements/requirements.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements.in b/requirements/requirements.in index 129ec1b15..0143405be 100644 --- a/requirements/requirements.in +++ b/requirements/requirements.in @@ -4,7 +4,7 @@ Jinja2 >= 2.10 importlib_metadata >= 3.6; python_version < "3.10" packaging pluginbase -protobuf >= 3.19 +protobuf <6.0dev,>=5.26.1 psutil ruamel.yaml >= 0.16.7 ruamel.yaml.clib >= 0.1.2 From 5e9eb76017fc875461ee86f3ff6f398be3ee0b7f Mon Sep 17 00:00:00 2001 From: Abderrahim Kitouni Date: Mon, 2 Jun 2025 09:16:04 +0100 Subject: [PATCH 2/2] Add note to update the requirements whenever the grpc code is regenerated --- doc/source/hacking/grpc_protocols.rst | 3 +++ setup.py | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/doc/source/hacking/grpc_protocols.rst b/doc/source/hacking/grpc_protocols.rst index 0ca4c743b..b0f9b414d 100644 --- a/doc/source/hacking/grpc_protocols.rst +++ b/doc/source/hacking/grpc_protocols.rst @@ -36,3 +36,6 @@ To actually regenerate the code:: ./setup.py build_grpc +The ``requirements/requirements.in`` file needs to be updated to match the +protobuf version requirements of the ``grpcio-tools`` version used to +generate the code. diff --git a/setup.py b/setup.py index 1e5887fec..fac86b726 100755 --- a/setup.py +++ b/setup.py @@ -202,6 +202,12 @@ def run(self): with open(path, "w", encoding="utf-8") as f: f.write(code) + print( + "\n" + "NOTE: Please update requirements/requirements.in to match the protobuf\n" + "requirement in the grpcio-tools version you used." + ) + def get_cmdclass(): cmdclass = {