-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Update mypy-protobuf #10914
Update mypy-protobuf #10914
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
cc @nipunn1313 |
This comment has been minimized.
This comment has been minimized.
How about the |
Don't have time to figure this out right now, sorry. |
Should the |
This comment has been minimized.
This comment has been minimized.
@Avasam I get this locally now when running the TF script:
Do you know what's up with that? I indeed can't find a |
This comment has been minimized.
This comment has been minimized.
Not sure, I just ran it fresh locally and it seems to be just fine |
any.proto is similar to standard library protobuf file (or maybe like protobuf-dev in analogy to python-dev). It's not part of tensorflow. It's sign that your protobuf install includes compiler, but not protobuf related headers. Fix is something like One option to make the script more robust is maybe to instead use |
tensorflow/compiler/xla/xla_pb2.pyi | ||
tensorflow/core/util/example_proto_fast_parsing_test_pb2.pyi | ||
|
||
isort "$REPO_ROOT/stubs/tensorflow/tensorflow" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If #10912 is merged first, this becomes:
isort "$REPO_ROOT/stubs/tensorflow/tensorflow" | |
ruff check "$REPO_ROOT/stubs/tensorflow/tensorflow" --fix-only |
lgtm |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
See #10909 (comment)
I had to edit some
sed
commands so they worked for me on Linux.The script also set the version of
stubs/protobuf/METADATA.toml
to 4.21.0; I changed it back.I tried updating
PROTOBUF_VERSION
andPYTHON_PROTOBUF_VERSION
to the latest (24.4/4.24.4), but the script failed; apparently they no longer distribute the Python library in the way the script expects.