From bcad0782643d4f52e188ac9e70edaecf8145069b Mon Sep 17 00:00:00 2001 From: Nipunn Koorapati Date: Thu, 20 Oct 2022 15:23:53 -0700 Subject: [PATCH] `types-protobuf`: Bump the rev of protobuf supported to 4.21.8 (#8937) --- scripts/generate_proto_stubs.sh | 9 +++++---- stubs/protobuf/google/protobuf/descriptor_pb2.pyi | 12 ++++++------ stubs/protobuf/google/protobuf/empty_pb2.pyi | 2 -- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/scripts/generate_proto_stubs.sh b/scripts/generate_proto_stubs.sh index 4677d36a8..0d4a04909 100755 --- a/scripts/generate_proto_stubs.sh +++ b/scripts/generate_proto_stubs.sh @@ -11,7 +11,8 @@ set -ex -o pipefail # followed by committing the changes to typeshed # # Update these two variables when rerunning script -PROTOBUF_VERSION=3.20.1 +PROTOBUF_VERSION=21.8 +PYTHON_PROTOBUF_VERSION=4.21.8 MYPY_PROTOBUF_VERSION=v3.3.0 if uname -a | grep Darwin; then @@ -22,7 +23,7 @@ else fi REPO_ROOT="$(realpath "$(dirname "${BASH_SOURCE[0]}")"/..)" TMP_DIR="$(mktemp -d)" -PYTHON_PROTOBUF_FILENAME="protobuf-python-${PROTOBUF_VERSION}.zip" +PYTHON_PROTOBUF_FILENAME="protobuf-python-${PYTHON_PROTOBUF_VERSION}.zip" PROTOC_FILENAME="protoc-${PROTOBUF_VERSION}-${PLAT}-x86_64.zip" PROTOC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VERSION}/$PROTOC_FILENAME" PYTHON_PROTOBUF_URL="https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VERSION}/$PYTHON_PROTOBUF_FILENAME" @@ -38,7 +39,7 @@ unzip "$PROTOC_FILENAME" -d protoc_install # Fetch protoc-python (which contains all the .proto files) wget "$PYTHON_PROTOBUF_URL" unzip "$PYTHON_PROTOBUF_FILENAME" -PYTHON_PROTOBUF_DIR="protobuf-$PROTOBUF_VERSION" +PYTHON_PROTOBUF_DIR="protobuf-$PYTHON_PROTOBUF_VERSION" # Prepare virtualenv VENV=venv @@ -76,4 +77,4 @@ isort "$REPO_ROOT/stubs/protobuf" black "$REPO_ROOT/stubs/protobuf" sed -i "" "s/mypy-protobuf [^\"]*/mypy-protobuf ${MYPY_PROTOBUF_VERSION}/" "$REPO_ROOT/stubs/protobuf/METADATA.toml" -sed -i "" "s/version = .*$/version = \"$(echo ${PROTOBUF_VERSION} | cut -d. -f1-2)\.\*\"/" "$REPO_ROOT/stubs/protobuf/METADATA.toml" +sed -i "" "s/version = .*$/version = \"$(echo ${PYTHON_PROTOBUF_VERSION} | cut -d. -f1-2)\.\*\"/" "$REPO_ROOT/stubs/protobuf/METADATA.toml" diff --git a/stubs/protobuf/google/protobuf/descriptor_pb2.pyi b/stubs/protobuf/google/protobuf/descriptor_pb2.pyi index 9ee7ef49b..4201fc470 100644 --- a/stubs/protobuf/google/protobuf/descriptor_pb2.pyi +++ b/stubs/protobuf/google/protobuf/descriptor_pb2.pyi @@ -1211,8 +1211,8 @@ class UninterpretedOption(google.protobuf.message.Message): """The name of the uninterpreted option. Each string represents a segment in a dot-separated name. is_extension is true iff a segment represents an extension (denoted with parentheses in options specs in .proto files). - E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - "foo.(bar.baz).qux". + E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents + "foo.(bar.baz).moo". """ DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -1344,13 +1344,13 @@ class SourceCodeInfo(google.protobuf.message.Message): // Comment attached to baz. // Another line attached to baz. - // Comment attached to qux. + // Comment attached to moo. // - // Another line attached to qux. - optional double qux = 4; + // Another line attached to moo. + optional double moo = 4; // Detached comment for corge. This is not leading or trailing comments - // to qux or corge because there are blank lines separating it from + // to moo or corge because there are blank lines separating it from // both. // Detached comment for corge paragraph 2. diff --git a/stubs/protobuf/google/protobuf/empty_pb2.pyi b/stubs/protobuf/google/protobuf/empty_pb2.pyi index 97fd53f6d..b58448ea1 100644 --- a/stubs/protobuf/google/protobuf/empty_pb2.pyi +++ b/stubs/protobuf/google/protobuf/empty_pb2.pyi @@ -44,8 +44,6 @@ class Empty(google.protobuf.message.Message): service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } - - The JSON representation for `Empty` is empty JSON object `{}`. """ DESCRIPTOR: google.protobuf.descriptor.Descriptor