Update protobuf to ~=6.32.1 (#14707)

This commit is contained in:
Stefan VanBuren
2025-09-16 23:05:26 -04:00
committed by GitHub
parent 29c69fe755
commit ab0339a7a2
5 changed files with 174 additions and 12 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
# Using an exact number in the specifier for scripts/sync_protobuf/google_protobuf.py
# When updating, also re-run the script
version = "~=6.30.2"
version = "~=6.32.1"
upstream_repository = "https://github.com/protocolbuffers/protobuf"
extra_description = "Partially generated using [mypy-protobuf==3.6.0](https://github.com/nipunn1313/mypy-protobuf/tree/v3.6.0) and libprotoc 29.0 on [protobuf v30.2](https://github.com/protocolbuffers/protobuf/releases/tag/v30.2) (python `protobuf==6.30.2`)."
extra_description = "Partially generated using [mypy-protobuf==3.6.0](https://github.com/nipunn1313/mypy-protobuf/tree/v3.6.0) and libprotoc 31.1 on [protobuf v32.1](https://github.com/protocolbuffers/protobuf/releases/tag/v32.1) (python `protobuf==6.32.1`)."
partial_stub = true
[tool.stubtest]
+33 -2
View File
@@ -55,6 +55,11 @@ class Api(google.protobuf.message.Message):
sometimes simply referred to as "APIs" in other contexts, such as the name of
this message itself. See https://cloud.google.com/apis/design/glossary for
detailed terminology.
New usages of this message as an alternative to ServiceDescriptorProto are
strongly discouraged. This message does not reliability preserve all
information necessary to model the schema and preserve semantics. Instead
make use of FileDescriptorSet which preserves the necessary information.
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
@@ -66,6 +71,7 @@ class Api(google.protobuf.message.Message):
SOURCE_CONTEXT_FIELD_NUMBER: builtins.int
MIXINS_FIELD_NUMBER: builtins.int
SYNTAX_FIELD_NUMBER: builtins.int
EDITION_FIELD_NUMBER: builtins.int
name: builtins.str
"""The fully qualified name of this interface, including package name
followed by the interface's simple name.
@@ -93,6 +99,8 @@ class Api(google.protobuf.message.Message):
"""
syntax: google.protobuf.type_pb2.Syntax.ValueType
"""The source syntax of the service."""
edition: builtins.str
"""The source edition string, only valid when syntax is SYNTAX_EDITIONS."""
@property
def methods(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Method]:
"""The methods of this interface, in unspecified order."""
@@ -121,11 +129,14 @@ class Api(google.protobuf.message.Message):
source_context: google.protobuf.source_context_pb2.SourceContext | None = ...,
mixins: collections.abc.Iterable[global___Mixin] | None = ...,
syntax: google.protobuf.type_pb2.Syntax.ValueType | None = ...,
edition: builtins.str | None = ...,
) -> None: ...
def HasField(self, field_name: typing.Literal["source_context", b"source_context"]) -> builtins.bool: ...
def ClearField(
self,
field_name: typing.Literal[
"edition",
b"edition",
"methods",
b"methods",
"mixins",
@@ -147,7 +158,13 @@ global___Api = Api
@typing.final
class Method(google.protobuf.message.Message):
"""Method represents a method of an API interface."""
"""Method represents a method of an API interface.
New usages of this message as an alternative to MethodDescriptorProto are
strongly discouraged. This message does not reliability preserve all
information necessary to model the schema and preserve semantics. Instead
make use of FileDescriptorSet which preserves the necessary information.
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
@@ -158,6 +175,7 @@ class Method(google.protobuf.message.Message):
RESPONSE_STREAMING_FIELD_NUMBER: builtins.int
OPTIONS_FIELD_NUMBER: builtins.int
SYNTAX_FIELD_NUMBER: builtins.int
EDITION_FIELD_NUMBER: builtins.int
name: builtins.str
"""The simple name of this method."""
request_type_url: builtins.str
@@ -169,7 +187,17 @@ class Method(google.protobuf.message.Message):
response_streaming: builtins.bool
"""If true, the response is streamed."""
syntax: google.protobuf.type_pb2.Syntax.ValueType
"""The source syntax of this method."""
"""The source syntax of this method.
This field should be ignored, instead the syntax should be inherited from
Api. This is similar to Field and EnumValue.
"""
edition: builtins.str
"""The source edition string, only valid when syntax is SYNTAX_EDITIONS.
This field should be ignored, instead the edition should be inherited from
Api. This is similar to Field and EnumValue.
"""
@property
def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.type_pb2.Option]:
"""Any metadata attached to the method."""
@@ -184,10 +212,13 @@ class Method(google.protobuf.message.Message):
response_streaming: builtins.bool | None = ...,
options: collections.abc.Iterable[google.protobuf.type_pb2.Option] | None = ...,
syntax: google.protobuf.type_pb2.Syntax.ValueType | None = ...,
edition: builtins.str | None = ...,
) -> None: ...
def ClearField(
self,
field_name: typing.Literal[
"edition",
b"edition",
"name",
b"name",
"options",
@@ -103,6 +103,31 @@ support a new edition.
"""
global___Edition = Edition
class _SymbolVisibility:
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType
class _SymbolVisibilityEnumTypeWrapper(
google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_SymbolVisibility.ValueType], builtins.type
):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
VISIBILITY_UNSET: _SymbolVisibility.ValueType # 0
VISIBILITY_LOCAL: _SymbolVisibility.ValueType # 1
VISIBILITY_EXPORT: _SymbolVisibility.ValueType # 2
class SymbolVisibility(_SymbolVisibility, metaclass=_SymbolVisibilityEnumTypeWrapper):
"""Describes the 'visibility' of a symbol with respect to the proto import
system. Symbols can only be imported when the visibility rules do not prevent
it (ex: local symbols cannot be imported). Visibility modifiers can only set
on `message` and `enum` as they are the only types available to be referenced
from other files.
"""
VISIBILITY_UNSET: SymbolVisibility.ValueType # 0
VISIBILITY_LOCAL: SymbolVisibility.ValueType # 1
VISIBILITY_EXPORT: SymbolVisibility.ValueType # 2
global___SymbolVisibility = SymbolVisibility
@typing.final
class FileDescriptorSet(google.protobuf.message.Message):
"""The protocol compiler can output a FileDescriptorSet containing the .proto
@@ -130,6 +155,7 @@ class FileDescriptorProto(google.protobuf.message.Message):
DEPENDENCY_FIELD_NUMBER: builtins.int
PUBLIC_DEPENDENCY_FIELD_NUMBER: builtins.int
WEAK_DEPENDENCY_FIELD_NUMBER: builtins.int
OPTION_DEPENDENCY_FIELD_NUMBER: builtins.int
MESSAGE_TYPE_FIELD_NUMBER: builtins.int
ENUM_TYPE_FIELD_NUMBER: builtins.int
SERVICE_FIELD_NUMBER: builtins.int
@@ -171,6 +197,12 @@ class FileDescriptorProto(google.protobuf.message.Message):
For Google-internal migration only. Do not use.
"""
@property
def option_dependency(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
"""Names of files imported by this file purely for the purpose of providing
option extensions. These are excluded from the dependency list above.
"""
@property
def message_type(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DescriptorProto]:
"""All top-level definitions in this file."""
@@ -199,6 +231,7 @@ class FileDescriptorProto(google.protobuf.message.Message):
dependency: collections.abc.Iterable[builtins.str] | None = ...,
public_dependency: collections.abc.Iterable[builtins.int] | None = ...,
weak_dependency: collections.abc.Iterable[builtins.int] | None = ...,
option_dependency: collections.abc.Iterable[builtins.str] | None = ...,
message_type: collections.abc.Iterable[global___DescriptorProto] | None = ...,
enum_type: collections.abc.Iterable[global___EnumDescriptorProto] | None = ...,
service: collections.abc.Iterable[global___ServiceDescriptorProto] | None = ...,
@@ -240,6 +273,8 @@ class FileDescriptorProto(google.protobuf.message.Message):
b"message_type",
"name",
b"name",
"option_dependency",
b"option_dependency",
"options",
b"options",
"package",
@@ -319,7 +354,10 @@ class DescriptorProto(google.protobuf.message.Message):
OPTIONS_FIELD_NUMBER: builtins.int
RESERVED_RANGE_FIELD_NUMBER: builtins.int
RESERVED_NAME_FIELD_NUMBER: builtins.int
VISIBILITY_FIELD_NUMBER: builtins.int
name: builtins.str
visibility: global___SymbolVisibility.ValueType
"""Support for `export` and `local` keywords on enums."""
@property
def field(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___FieldDescriptorProto]: ...
@property
@@ -361,8 +399,11 @@ class DescriptorProto(google.protobuf.message.Message):
options: global___MessageOptions | None = ...,
reserved_range: collections.abc.Iterable[global___DescriptorProto.ReservedRange] | None = ...,
reserved_name: collections.abc.Iterable[builtins.str] | None = ...,
visibility: global___SymbolVisibility.ValueType | None = ...,
) -> None: ...
def HasField(self, field_name: typing.Literal["name", b"name", "options", b"options"]) -> builtins.bool: ...
def HasField(
self, field_name: typing.Literal["name", b"name", "options", b"options", "visibility", b"visibility"]
) -> builtins.bool: ...
def ClearField(
self,
field_name: typing.Literal[
@@ -386,6 +427,8 @@ class DescriptorProto(google.protobuf.message.Message):
b"reserved_name",
"reserved_range",
b"reserved_range",
"visibility",
b"visibility",
],
) -> None: ...
@@ -829,7 +872,10 @@ class EnumDescriptorProto(google.protobuf.message.Message):
OPTIONS_FIELD_NUMBER: builtins.int
RESERVED_RANGE_FIELD_NUMBER: builtins.int
RESERVED_NAME_FIELD_NUMBER: builtins.int
VISIBILITY_FIELD_NUMBER: builtins.int
name: builtins.str
visibility: global___SymbolVisibility.ValueType
"""Support for `export` and `local` keywords on enums."""
@property
def value(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___EnumValueDescriptorProto]: ...
@property
@@ -857,8 +903,11 @@ class EnumDescriptorProto(google.protobuf.message.Message):
options: global___EnumOptions | None = ...,
reserved_range: collections.abc.Iterable[global___EnumDescriptorProto.EnumReservedRange] | None = ...,
reserved_name: collections.abc.Iterable[builtins.str] | None = ...,
visibility: global___SymbolVisibility.ValueType | None = ...,
) -> None: ...
def HasField(self, field_name: typing.Literal["name", b"name", "options", b"options"]) -> builtins.bool: ...
def HasField(
self, field_name: typing.Literal["name", b"name", "options", b"options", "visibility", b"visibility"]
) -> builtins.bool: ...
def ClearField(
self,
field_name: typing.Literal[
@@ -872,6 +921,8 @@ class EnumDescriptorProto(google.protobuf.message.Message):
b"reserved_range",
"value",
b"value",
"visibility",
b"visibility",
],
) -> None: ...
@@ -1732,7 +1783,9 @@ class FieldOptions(google.protobuf.message.Message):
is a formalization for deprecating fields.
"""
weak: builtins.bool
"""For Google-internal migration only. Do not use."""
"""DEPRECATED. DO NOT USE!
For Google-internal migration only. Do not use.
"""
debug_redact: builtins.bool
"""Indicate that the field value should not be printed out when using debug
formats, e.g. when the field contains sensitive credentials.
@@ -2413,6 +2466,50 @@ class FeatureSet(google.protobuf.message.Message):
STYLE2024: FeatureSet.EnforceNamingStyle.ValueType # 1
STYLE_LEGACY: FeatureSet.EnforceNamingStyle.ValueType # 2
@typing.final
class VisibilityFeature(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
class _DefaultSymbolVisibility:
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType
class _DefaultSymbolVisibilityEnumTypeWrapper(
google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[
FeatureSet.VisibilityFeature._DefaultSymbolVisibility.ValueType
],
builtins.type,
):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN: FeatureSet.VisibilityFeature._DefaultSymbolVisibility.ValueType # 0
EXPORT_ALL: FeatureSet.VisibilityFeature._DefaultSymbolVisibility.ValueType # 1
"""Default pre-EDITION_2024, all UNSET visibility are export."""
EXPORT_TOP_LEVEL: FeatureSet.VisibilityFeature._DefaultSymbolVisibility.ValueType # 2
"""All top-level symbols default to export, nested default to local."""
LOCAL_ALL: FeatureSet.VisibilityFeature._DefaultSymbolVisibility.ValueType # 3
"""All symbols default to local."""
STRICT: FeatureSet.VisibilityFeature._DefaultSymbolVisibility.ValueType # 4
"""All symbols local by default. Nested types cannot be exported.
With special case caveat for message { enum {} reserved 1 to max; }
This is the recommended setting for new protos.
"""
class DefaultSymbolVisibility(_DefaultSymbolVisibility, metaclass=_DefaultSymbolVisibilityEnumTypeWrapper): ...
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN: FeatureSet.VisibilityFeature.DefaultSymbolVisibility.ValueType # 0
EXPORT_ALL: FeatureSet.VisibilityFeature.DefaultSymbolVisibility.ValueType # 1
"""Default pre-EDITION_2024, all UNSET visibility are export."""
EXPORT_TOP_LEVEL: FeatureSet.VisibilityFeature.DefaultSymbolVisibility.ValueType # 2
"""All top-level symbols default to export, nested default to local."""
LOCAL_ALL: FeatureSet.VisibilityFeature.DefaultSymbolVisibility.ValueType # 3
"""All symbols default to local."""
STRICT: FeatureSet.VisibilityFeature.DefaultSymbolVisibility.ValueType # 4
"""All symbols local by default. Nested types cannot be exported.
With special case caveat for message { enum {} reserved 1 to max; }
This is the recommended setting for new protos.
"""
def __init__(self) -> None: ...
FIELD_PRESENCE_FIELD_NUMBER: builtins.int
ENUM_TYPE_FIELD_NUMBER: builtins.int
REPEATED_FIELD_ENCODING_FIELD_NUMBER: builtins.int
@@ -2420,6 +2517,7 @@ class FeatureSet(google.protobuf.message.Message):
MESSAGE_ENCODING_FIELD_NUMBER: builtins.int
JSON_FORMAT_FIELD_NUMBER: builtins.int
ENFORCE_NAMING_STYLE_FIELD_NUMBER: builtins.int
DEFAULT_SYMBOL_VISIBILITY_FIELD_NUMBER: builtins.int
field_presence: global___FeatureSet.FieldPresence.ValueType
enum_type: global___FeatureSet.EnumType.ValueType
repeated_field_encoding: global___FeatureSet.RepeatedFieldEncoding.ValueType
@@ -2427,6 +2525,7 @@ class FeatureSet(google.protobuf.message.Message):
message_encoding: global___FeatureSet.MessageEncoding.ValueType
json_format: global___FeatureSet.JsonFormat.ValueType
enforce_naming_style: global___FeatureSet.EnforceNamingStyle.ValueType
default_symbol_visibility: global___FeatureSet.VisibilityFeature.DefaultSymbolVisibility.ValueType
def __init__(
self,
*,
@@ -2437,10 +2536,13 @@ class FeatureSet(google.protobuf.message.Message):
message_encoding: global___FeatureSet.MessageEncoding.ValueType | None = ...,
json_format: global___FeatureSet.JsonFormat.ValueType | None = ...,
enforce_naming_style: global___FeatureSet.EnforceNamingStyle.ValueType | None = ...,
default_symbol_visibility: global___FeatureSet.VisibilityFeature.DefaultSymbolVisibility.ValueType | None = ...,
) -> None: ...
def HasField(
self,
field_name: typing.Literal[
"default_symbol_visibility",
b"default_symbol_visibility",
"enforce_naming_style",
b"enforce_naming_style",
"enum_type",
@@ -2460,6 +2562,8 @@ class FeatureSet(google.protobuf.message.Message):
def ClearField(
self,
field_name: typing.Literal[
"default_symbol_visibility",
b"default_symbol_visibility",
"enforce_naming_style",
b"enforce_naming_style",
"enum_type",
@@ -1,3 +1,2 @@
def Type() -> str: ...
def Version() -> int: ...
def IsPythonDefaultSerializationDeterministic() -> bool: ...
+32 -4
View File
@@ -77,7 +77,13 @@ global___Syntax = Syntax
@typing.final
class Type(google.protobuf.message.Message):
"""A protocol buffer message type."""
"""A protocol buffer message type.
New usages of this message as an alternative to DescriptorProto are strongly
discouraged. This message does not reliability preserve all information
necessary to model the schema and preserve semantics. Instead make use of
FileDescriptorSet which preserves the necessary information.
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
@@ -146,7 +152,13 @@ global___Type = Type
@typing.final
class Field(google.protobuf.message.Message):
"""A single field of a message type."""
"""A single field of a message type.
New usages of this message as an alternative to FieldDescriptorProto are
strongly discouraged. This message does not reliability preserve all
information necessary to model the schema and preserve semantics. Instead
make use of FileDescriptorSet which preserves the necessary information.
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
@@ -346,7 +358,13 @@ global___Field = Field
@typing.final
class Enum(google.protobuf.message.Message):
"""Enum type definition."""
"""Enum type definition.
New usages of this message as an alternative to EnumDescriptorProto are
strongly discouraged. This message does not reliability preserve all
information necessary to model the schema and preserve semantics. Instead
make use of FileDescriptorSet which preserves the necessary information.
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
@@ -407,7 +425,13 @@ global___Enum = Enum
@typing.final
class EnumValue(google.protobuf.message.Message):
"""Enum value definition."""
"""Enum value definition.
New usages of this message as an alternative to EnumValueDescriptorProto are
strongly discouraged. This message does not reliability preserve all
information necessary to model the schema and preserve semantics. Instead
make use of FileDescriptorSet which preserves the necessary information.
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
@@ -437,6 +461,10 @@ global___EnumValue = EnumValue
class Option(google.protobuf.message.Message):
"""A protocol buffer option, which can be attached to a message, field,
enumeration, etc.
New usages of this message as an alternative to FileOptions, MessageOptions,
FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions
are strongly discouraged.
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor