types-protobuf: Bump the rev of protobuf supported to 4.21.8 (#8937)

This commit is contained in:
Nipunn Koorapati
2022-10-20 15:23:53 -07:00
committed by GitHub
parent 918f2266da
commit bcad078264
3 changed files with 11 additions and 12 deletions

View File

@@ -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"

View File

@@ -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.

View File

@@ -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