-
Notifications
You must be signed in to change notification settings - Fork 15.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: protobuf==4.21.0rc1 adds dependency on grpcio-tools #9954
Comments
This error indicates that you are using old generated code. The file Per the update at https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates, protobuf 4.21.0 requires that the If you regenerate the
My hunch is that installing grpcio-tools downgraded protobuf to 3.x. |
@haberman - since it looks like 4.21.0 final is not yet released, could the protobuf team please consider improving the error message that users get in this case to make it clearer what's broken, prior to the final release? For example, maybe The context is that my team also got a report of this issue: tensorflow/tensorboard#5703 Older releases of our pip package that have generated Python proto files don't have an upper bound on their Edited to add that this will also break a lot of existing released TensorFlow pip packages with the same unclear failure mode, as I think you've seen: tensorflow/tensorflow#56077 (comment) I am not on the TF team but FWIW, my understanding is that they are blocked on upgrading protoc due to tensorflow/tensorflow#53234 which is very unlikely to be something that can be resolved in a few days, and TF's release cadence almost certainly wouldn't allow rushing out a patch release in that time frame either, so a fix on the TF side seems very challenging given the relatively short notice. |
Yes I think that is a good idea. I had been thinking a similar thing. |
@haberman Thanks for considering, that would be much appreciated 👍 |
See also: #53234 See also: protocolbuffers/protobuf#9954 See also: #56077 PiperOrigin-RevId: 450054200
See also: #53234 See also: protocolbuffers/protobuf#9954 See also: #56077 PiperOrigin-RevId: 450054200
See also: #53234 See also: protocolbuffers/protobuf#9954 See also: #56077 PiperOrigin-RevId: 450054200
See also: tensorflow#53234 See also: protocolbuffers/protobuf#9954 See also: tensorflow#56077 PiperOrigin-RevId: 450054200
See also: tensorflow#53234 See also: protocolbuffers/protobuf#9954 See also: tensorflow#56077 PiperOrigin-RevId: 450054200
See also: tensorflow#53234 See also: protocolbuffers/protobuf#9954 See also: tensorflow#56077 PiperOrigin-RevId: 450054200
The latest protobuf release is not backwards compatible with TensorFlow's protos and our copies of those protos in tensorboard/compat/proto . We knew this change was coming so, fortunately, TF had already fixed their dependencies to force a compatible version of protobuf. However, we also have to update our own requirements.txt to force the same version of protobuf, to unbreak the build when TensorFlow is not installed. Googlers, see: http://b/182876485. See: protocolbuffers/protobuf#9954 (comment) See: https://cs.opensource.google/tensorflow/tensorflow/+/master:tensorflow/tools/pip_package/setup.py?q=protobuf
Regarding protobuf "4.21", does that mean the python version will diverge from mainstream version? |
The latest protobuf release is not backwards compatible with TensorFlow's protos and our copies of those protos in tensorboard/compat/proto . We knew this change was coming so, fortunately, TF had already fixed their dependencies to force a compatible version of protobuf. However, we also have to update our own requirements.txt to force the same version of protobuf, to unbreak the build when TensorFlow is not installed. Googlers, see: http://b/182876485. See: protocolbuffers/protobuf#9954 (comment) See: https://cs.opensource.google/tensorflow/tensorflow/+/master:tensorflow/tools/pip_package/setup.py?q=protobuf
The latest protobuf release is not backwards compatible with TensorFlow's protos and our copies of those protos in tensorboard/compat/proto . We knew this change was coming so, fortunately, TF had already fixed their dependencies to force a compatible version of protobuf. However, we also have to update our own requirements.txt to force the same version of protobuf, to unbreak the build when TensorFlow is not installed. Googlers, see: http://b/182876485. See: protocolbuffers/protobuf#9954 (comment) See: https://cs.opensource.google/tensorflow/tensorflow/+/master:tensorflow/tools/pip_package/setup.py?q=protobuf
Summary: See also: tensorflow/tensorflow#53234 See also: protocolbuffers/protobuf#9954 See also: tensorflow/tensorflow#56077 TF1.15 Only Reviewers: #tensorflow, #framework_ip_review_-_any_oss_or_third-party_code_use_has_been_approved, vladimirm Reviewed By: #tensorflow, #framework_ip_review_-_any_oss_or_third-party_code_use_has_been_approved, vladimirm Maniphest Tasks: T63128 Differential Revision: https://phabricator.sourcevertex.net/D67981
See also: tensorflow#53234 See also: protocolbuffers/protobuf#9954 See also: tensorflow#56077 PiperOrigin-RevId: 450054200
The latest protobuf release is not backwards compatible with TensorFlow's protos and our copies of those protos in tensorboard/compat/proto . We knew this change was coming so, fortunately, TF had already fixed their dependencies to force a compatible version of protobuf. However, we also have to update our own requirements.txt to force the same version of protobuf, to unbreak the build when TensorFlow is not installed. Googlers, see: http://b/182876485. See: protocolbuffers/protobuf#9954 (comment) See: https://cs.opensource.google/tensorflow/tensorflow/+/master:tensorflow/tools/pip_package/setup.py?q=protobuf
The latest protobuf release is not backwards compatible with TensorFlow's protos and our copies of those protos in tensorboard/compat/proto . We knew this change was coming so, fortunately, TF had already fixed their dependencies to force a compatible version of protobuf. However, we also have to update our own requirements.txt to force the same version of protobuf, to unbreak the build when TensorFlow is not installed. Googlers, see: http://b/182876485. See: protocolbuffers/protobuf#9954 (comment) See: https://cs.opensource.google/tensorflow/tensorflow/+/master:tensorflow/tools/pip_package/setup.py?q=protobuf
What version of protobuf and what language are you using?
Version: 4.21.0rc1
Language: Python
What operating system (Linux, Windows, ...) and version?
Ubuntu 20.04.4 LTS
What runtime / compiler are you using (e.g., python version or gcc version)
Python 3.9.12
What did you do?
Steps to reproduce the behavior:
pip install googleapis-common-protos
>>> from google.rpc import error_details_pb2
pip install protobuf==4.21.0rc1
to install the pre-release version of protobuf>>> from google.rpc import error_details_pb2
grpcio-tools==1.44.0
or newer>>> from google.rpc import error_details_pb2
grpcio-tools
>>> from google.rpc import error_details_pb2
What did you expect to see
I expected to run
from google.rpc import error_details_pb2
in a python shell successfully after installing bothgoogleapis-common-protos
andprotobuf==4.21.0rc1
What did you see instead?
I saw this error
The strange thing is that installing
grpcio-tools
solved the issue, however removinggrpcio-tools
did not bring the issue back.Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment
I used a clean environment for testing, only installing
googleapis-common-protos
andprotobuf==4.21.0rc1
The text was updated successfully, but these errors were encountered: