From 639771a22a355d45651be1e1d025f19486f77b81 Mon Sep 17 00:00:00 2001 From: Kunal Arya Date: Wed, 27 May 2020 21:53:58 -0500 Subject: [PATCH] Broaden _Serialized type in protobufs to ByteString. (#3890) --- third_party/2and3/google/protobuf/message.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/2and3/google/protobuf/message.pyi b/third_party/2and3/google/protobuf/message.pyi index 053d0cf3f..307d171ba 100644 --- a/third_party/2and3/google/protobuf/message.pyi +++ b/third_party/2and3/google/protobuf/message.pyi @@ -1,6 +1,6 @@ import sys -from typing import Any, Sequence, Optional, Tuple, Type, TypeVar, Union +from typing import Any, ByteString, Sequence, Optional, Tuple, Type, TypeVar, Union from .descriptor import Descriptor, DescriptorBase, FieldDescriptor @@ -17,7 +17,7 @@ _M = TypeVar("_M", bound=Message) # message type (of self) if sys.version_info < (3,): _Serialized = Union[bytes, buffer, unicode] else: - _Serialized = bytes + _Serialized = ByteString class Message: DESCRIPTOR: Descriptor