Skip to content

Commit 41ec08c

Browse files
yashyktgnossen
andauthored
Update third_party/protobuf to 3.21.4 (grpc#30377)
* 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]>
1 parent 15a8113 commit 41ec08c

File tree

73 files changed

+1697
-2672
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1697
-2672
lines changed

.pylintrc-examples

+2
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,7 @@ disable=
102102
wrong-import-order,
103103
# TODO(https://github.com/PyCQA/pylint/issues/3882): Upgrade Pylint
104104
unsubscriptable-object,
105+
# NOTE(rbellevi): Pylint doesn't understand .pyi files.
106+
no-member,
105107
# NOTE(sergiitk): yapf compatibility, ref #25071
106108
bad-continuation,

bazel/generate_cc.bzl

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def generate_cc_impl(ctx):
143143
f = ctx.attr.well_known_protos.files.to_list()[0].dirname
144144
if f != "external/com_google_protobuf/src/google/protobuf":
145145
print(
146-
"Error: Only @com_google_protobuf//:well_known_protos is supported",
146+
"Error: Only @com_google_protobuf//:well_known_type_protos is supported",
147147
) # buildifier: disable=print
148148
else:
149149
# f points to "external/com_google_protobuf/src/google/protobuf"
@@ -200,7 +200,7 @@ _generate_cc = rule(
200200
def generate_cc(well_known_protos, **kwargs):
201201
if well_known_protos:
202202
_generate_cc(
203-
well_known_protos = "@com_google_protobuf//:well_known_protos",
203+
well_known_protos = "@com_google_protobuf//:well_known_type_protos",
204204
**kwargs
205205
)
206206
else:

bazel/generate_objc.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ generate_objc = rule(
177177
default = False,
178178
),
179179
"well_known_protos": attr.label(
180-
default = "@com_google_protobuf//:well_known_protos",
180+
default = "@com_google_protobuf//:well_known_type_protos",
181181
),
182182
"_protoc": attr.label(
183183
default = Label("//external:protocol_compiler"),

bazel/grpc_deps.bzl

+4-4
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@ def grpc_deps():
208208
if "com_google_protobuf" not in native.existing_rules():
209209
http_archive(
210210
name = "com_google_protobuf",
211-
sha256 = "bab1685f92cc4ea5b6420026eef6c7973ae96fc21f4f1a3ee626dc6ca6d77c12",
212-
strip_prefix = "protobuf-22d0e265de7d2b3d2e9a00d071313502e7d4cccf",
211+
sha256 = "fc4e76d540ade9a3a45cc6baf6d7c60eae2a414e2a454529b97b5364b9141ea9",
212+
strip_prefix = "protobuf-c9869dc7803eb0a21d7e589c40ff4f9288cd34ae",
213213
urls = [
214-
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/protobuf/archive/22d0e265de7d2b3d2e9a00d071313502e7d4cccf.tar.gz",
215-
"https://github.com/protocolbuffers/protobuf/archive/22d0e265de7d2b3d2e9a00d071313502e7d4cccf.tar.gz",
214+
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/protobuf/archive/c9869dc7803eb0a21d7e589c40ff4f9288cd34ae.tar.gz",
215+
"https://github.com/protocolbuffers/protobuf/archive/c9869dc7803eb0a21d7e589c40ff4f9288cd34ae.tar.gz",
216216
],
217217
patches = ["@com_github_grpc_grpc//third_party:protobuf.patch"],
218218
patch_args = ["-p1"],

build_handwritten.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ settings:
1515
core_version: 26.0.0
1616
csharp_major_version: 2
1717
g_stands_for: gamma
18-
protobuf_version: 3.19.4
18+
protobuf_version: 3.21.4
1919
version: 1.49.0-dev
2020
targets:
2121
- name: gen_hpack_tables

examples/python/Makefile

+109
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)