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/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 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 = {