Skip to content

Commit

Permalink
Update third_party/protobuf to 3.21.4 (grpc#30377)
Browse files Browse the repository at this point in the history
* Update third_party/protobuf

* run tools/distrib/python/make_grpcio_tools.py

* regenerate protos for ruby, php

* update build_handwritten.yaml

* regenerate projects

* Build - Use :well_known_type_protos instead of :well_known_protos

* Fix target

* Update upb

* Update Python for Protobuf 4.21 (grpc#140)

* Update protobuf dependency on grpcio-tools

* Off by one

* Drop python 3.6 support

* Try upgrading pip

* And in the other script

* Try to figure out if we're compatible with abi3

* See what we've already got installed

* Update the requirements.txt file I didn't know existed

* And here too

* See what's installed

* Let's try that again

* Remove

* Try to confirm version

* Let me see the generated code

* Fix non-Bazel test runner

* Work for all test directories

* Regenerate example protos

* Clean up

* Generate .pyi files

* Fix type checking and linting

* Exclude pyi files from isort

* Upgrade to 3.21.4

* Update iwyu to get around messy protobuf IWYU rules

Co-authored-by: Richard Belleville <[email protected]>
  • Loading branch information
yashykt and gnossen authored Aug 4, 2022
1 parent 15a8113 commit 41ec08c
Show file tree
Hide file tree
Showing 73 changed files with 1,697 additions and 2,672 deletions.
2 changes: 2 additions & 0 deletions .pylintrc-examples
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,7 @@ disable=
wrong-import-order,
# TODO(https://github.com/PyCQA/pylint/issues/3882): Upgrade Pylint
unsubscriptable-object,
# NOTE(rbellevi): Pylint doesn't understand .pyi files.
no-member,
# NOTE(sergiitk): yapf compatibility, ref #25071
bad-continuation,
4 changes: 2 additions & 2 deletions bazel/generate_cc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def generate_cc_impl(ctx):
f = ctx.attr.well_known_protos.files.to_list()[0].dirname
if f != "external/com_google_protobuf/src/google/protobuf":
print(
"Error: Only @com_google_protobuf//:well_known_protos is supported",
"Error: Only @com_google_protobuf//:well_known_type_protos is supported",
) # buildifier: disable=print
else:
# f points to "external/com_google_protobuf/src/google/protobuf"
Expand Down Expand Up @@ -200,7 +200,7 @@ _generate_cc = rule(
def generate_cc(well_known_protos, **kwargs):
if well_known_protos:
_generate_cc(
well_known_protos = "@com_google_protobuf//:well_known_protos",
well_known_protos = "@com_google_protobuf//:well_known_type_protos",
**kwargs
)
else:
Expand Down
2 changes: 1 addition & 1 deletion bazel/generate_objc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ generate_objc = rule(
default = False,
),
"well_known_protos": attr.label(
default = "@com_google_protobuf//:well_known_protos",
default = "@com_google_protobuf//:well_known_type_protos",
),
"_protoc": attr.label(
default = Label("//external:protocol_compiler"),
Expand Down
8 changes: 4 additions & 4 deletions bazel/grpc_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ def grpc_deps():
if "com_google_protobuf" not in native.existing_rules():
http_archive(
name = "com_google_protobuf",
sha256 = "bab1685f92cc4ea5b6420026eef6c7973ae96fc21f4f1a3ee626dc6ca6d77c12",
strip_prefix = "protobuf-22d0e265de7d2b3d2e9a00d071313502e7d4cccf",
sha256 = "fc4e76d540ade9a3a45cc6baf6d7c60eae2a414e2a454529b97b5364b9141ea9",
strip_prefix = "protobuf-c9869dc7803eb0a21d7e589c40ff4f9288cd34ae",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/protobuf/archive/22d0e265de7d2b3d2e9a00d071313502e7d4cccf.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/22d0e265de7d2b3d2e9a00d071313502e7d4cccf.tar.gz",
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/protobuf/archive/c9869dc7803eb0a21d7e589c40ff4f9288cd34ae.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/c9869dc7803eb0a21d7e589c40ff4f9288cd34ae.tar.gz",
],
patches = ["@com_github_grpc_grpc//third_party:protobuf.patch"],
patch_args = ["-p1"],
Expand Down
2 changes: 1 addition & 1 deletion build_handwritten.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ settings:
core_version: 26.0.0
csharp_major_version: 2
g_stands_for: gamma
protobuf_version: 3.19.4
protobuf_version: 3.21.4
version: 1.49.0-dev
targets:
- name: gen_hpack_tables
Expand Down
109 changes: 109 additions & 0 deletions examples/python/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 41ec08c

Please sign in to comment.