Bump protobuf to 3.19.2 (#6879)

This commit is contained in:
Nipunn Koorapati
2022-01-10 01:03:41 -08:00
committed by GitHub
parent 96c9abb058
commit fc4ba3ac64
7 changed files with 12 additions and 40 deletions

View File

@@ -11,7 +11,7 @@ set -ex -o pipefail
# followed by committing the changes to typeshed
#
# Update these two variables when rerunning script
PROTOBUF_VERSION=3.18.1
PROTOBUF_VERSION=3.19.2
MYPY_PROTOBUF_VERSION=v3.0.0
if uname -a | grep Darwin; then
@@ -74,4 +74,5 @@ protoc_install/bin/protoc --proto_path="$PYTHON_PROTOBUF_DIR/src" --mypy_out="$R
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/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"

View File

@@ -99,13 +99,8 @@ google.protobuf.duration_pb2.Duration.__init__
google.protobuf.empty_pb2.Empty.__init__
google.protobuf.field_mask_pb2.FieldMask.__init__
google.protobuf.internal.containers.BaseContainer.sort
google.protobuf.internal.containers.Mapping
google.protobuf.internal.containers.MessageMap.__init__
google.protobuf.internal.containers.MessageMap.get
google.protobuf.internal.containers.MutableMapping.__delitem__
google.protobuf.internal.containers.MutableMapping.__setitem__
google.protobuf.internal.containers.MutableMapping.pop
google.protobuf.internal.containers.MutableMapping.setdefault
google.protobuf.internal.containers.RepeatedCompositeFieldContainer.__init__
google.protobuf.internal.containers.RepeatedScalarFieldContainer.__init__
google.protobuf.internal.containers.ScalarMap.__init__
@@ -123,7 +118,6 @@ google.protobuf.internal.well_known_types.Error
google.protobuf.internal.well_known_types.ParseError
google.protobuf.message.Message.DESCRIPTOR
google.protobuf.message.Message.Extensions
google.protobuf.message.Message.FromString
google.protobuf.message.Message.SerializePartialToString
google.protobuf.message.Message.SerializeToString
google.protobuf.message.Message.__init__

View File

@@ -1,4 +1,4 @@
version = "3.18.*"
version = "3.19.*"
python2 = true
requires = ["types-futures"]
extra_description = "Generated with aid from mypy-protobuf v3.0.0"

View File

@@ -1,18 +1,5 @@
from typing import (
Any,
Callable,
Iterable,
Iterator,
List,
Mapping as Mapping,
MutableMapping as MutableMapping,
Optional,
Sequence,
Text,
TypeVar,
Union,
overload,
)
from collections.abc import MutableMapping
from typing import Any, Callable, Iterable, Iterator, List, Optional, Sequence, Text, TypeVar, Union, overload
from typing_extensions import SupportsIndex
from google.protobuf.descriptor import Descriptor

View File

@@ -1,5 +1,4 @@
import sys
from typing import Any, ByteString, Sequence, Tuple, Type, TypeVar, Union
from typing import Any, Sequence, Tuple, Type, TypeVar
from .descriptor import Descriptor, FieldDescriptor
from .internal.extension_dict import _ExtensionDict, _ExtensionFieldDescriptor
@@ -10,11 +9,6 @@ class EncodeError(Error): ...
_M = TypeVar("_M", bound=Message) # message type (of self)
if sys.version_info >= (3, 0):
_Serialized = ByteString
else:
_Serialized = Union[bytes, buffer, unicode]
class Message:
DESCRIPTOR: Descriptor
def __deepcopy__(self, memo=...): ...
@@ -25,8 +19,8 @@ class Message:
def Clear(self) -> None: ...
def SetInParent(self) -> None: ...
def IsInitialized(self) -> bool: ...
def MergeFromString(self, serialized: _Serialized) -> int: ...
def ParseFromString(self, serialized: _Serialized) -> int: ...
def MergeFromString(self, serialized: bytes) -> int: ...
def ParseFromString(self, serialized: bytes) -> int: ...
def SerializeToString(self, deterministic: bool = ...) -> bytes: ...
def SerializePartialToString(self, deterministic: bool = ...) -> bytes: ...
def ListFields(self) -> Sequence[Tuple[FieldDescriptor, Any]]: ...
@@ -34,7 +28,7 @@ class Message:
def ClearExtension(self: _M, extension_handle: _ExtensionFieldDescriptor[_M, Any]) -> None: ...
def ByteSize(self) -> int: ...
@classmethod
def FromString(cls: Type[_M], s: _Serialized) -> _M: ...
def FromString(cls: Type[_M], s: bytes) -> _M: ...
@property
def Extensions(self: _M) -> _ExtensionDict[_M]: ...
# Intentionally left out typing on these three methods, because they are

View File

@@ -75,8 +75,8 @@ global___Struct = Struct
class Value(google.protobuf.message.Message):
"""`Value` represents a dynamically typed value which can be either
null, a number, a string, a boolean, a recursive struct value, or a
list of values. A producer of value is expected to set one of that
variants, absence of any variant indicates an error.
list of values. A producer of value is expected to set one of these
variants. Absence of any variant indicates an error.
The JSON representation for `Value` is JSON value.
"""

View File

@@ -1,4 +1,3 @@
import sys
from _typeshed import SupportsWrite
from typing import Any, Callable, Iterable, Optional, Text, Tuple, TypeVar, Union
@@ -6,9 +5,6 @@ from .descriptor import FieldDescriptor
from .descriptor_pool import DescriptorPool
from .message import Message
if sys.version_info < (3, 0):
long = int
_M = TypeVar("_M", bound=Message) # message type (of self)
class Error(Exception): ...