protobuf 6.31.0rc2__py3-none-any.whl → 6.32.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of protobuf might be problematic. Click here for more details.
- google/protobuf/__init__.py +1 -1
- google/protobuf/any_pb2.py +3 -3
- google/protobuf/api_pb2.py +13 -9
- google/protobuf/compiler/plugin_pb2.py +3 -3
- google/protobuf/descriptor.py +398 -246
- google/protobuf/descriptor_pb2.py +75 -73
- google/protobuf/descriptor_pool.py +5 -4
- google/protobuf/duration_pb2.py +3 -3
- google/protobuf/empty_pb2.py +3 -3
- google/protobuf/field_mask_pb2.py +3 -3
- google/protobuf/internal/api_implementation.py +0 -6
- google/protobuf/internal/decoder.py +31 -0
- google/protobuf/internal/extension_dict.py +3 -3
- google/protobuf/internal/field_mask.py +3 -3
- google/protobuf/internal/python_message.py +10 -2
- google/protobuf/internal/type_checkers.py +11 -2
- google/protobuf/json_format.py +49 -32
- google/protobuf/runtime_version.py +7 -27
- google/protobuf/source_context_pb2.py +3 -3
- google/protobuf/struct_pb2.py +3 -3
- google/protobuf/text_format.py +20 -19
- google/protobuf/timestamp_pb2.py +3 -3
- google/protobuf/type_pb2.py +3 -3
- google/protobuf/wrappers_pb2.py +3 -3
- {protobuf-6.31.0rc2.dist-info → protobuf-6.32.0rc1.dist-info}/METADATA +1 -1
- {protobuf-6.31.0rc2.dist-info → protobuf-6.32.0rc1.dist-info}/RECORD +28 -28
- {protobuf-6.31.0rc2.dist-info → protobuf-6.32.0rc1.dist-info}/LICENSE +0 -0
- {protobuf-6.31.0rc2.dist-info → protobuf-6.32.0rc1.dist-info}/WHEEL +0 -0
|
@@ -100,7 +100,7 @@ def _IsValidPath(message_descriptor, path):
|
|
|
100
100
|
for name in parts:
|
|
101
101
|
field = message_descriptor.fields_by_name.get(name)
|
|
102
102
|
if (field is None or
|
|
103
|
-
field.
|
|
103
|
+
field.is_repeated or
|
|
104
104
|
field.type != FieldDescriptor.TYPE_MESSAGE):
|
|
105
105
|
return False
|
|
106
106
|
message_descriptor = field.message_type
|
|
@@ -271,7 +271,7 @@ def _MergeMessage(
|
|
|
271
271
|
name, source_descriptor.full_name))
|
|
272
272
|
if child:
|
|
273
273
|
# Sub-paths are only allowed for singular message fields.
|
|
274
|
-
if (field.
|
|
274
|
+
if (field.is_repeated or
|
|
275
275
|
field.cpp_type != FieldDescriptor.CPPTYPE_MESSAGE):
|
|
276
276
|
raise ValueError('Error: Field {0} in message {1} is not a singular '
|
|
277
277
|
'message field and cannot have sub-fields.'.format(
|
|
@@ -281,7 +281,7 @@ def _MergeMessage(
|
|
|
281
281
|
child, getattr(source, name), getattr(destination, name),
|
|
282
282
|
replace_message, replace_repeated)
|
|
283
283
|
continue
|
|
284
|
-
if field.
|
|
284
|
+
if field.is_repeated:
|
|
285
285
|
if replace_repeated:
|
|
286
286
|
destination.ClearField(_StrConvert(name))
|
|
287
287
|
repeated_source = getattr(source, name)
|
|
@@ -256,7 +256,8 @@ def _IsMessageSetExtension(field):
|
|
|
256
256
|
field.containing_type.has_options and
|
|
257
257
|
field.containing_type.GetOptions().message_set_wire_format and
|
|
258
258
|
field.type == _FieldDescriptor.TYPE_MESSAGE and
|
|
259
|
-
field.
|
|
259
|
+
not field.is_required and
|
|
260
|
+
not field.is_repeated)
|
|
260
261
|
|
|
261
262
|
|
|
262
263
|
def _IsMapField(field):
|
|
@@ -828,6 +829,13 @@ def _AddPropertiesForExtensions(descriptor, cls):
|
|
|
828
829
|
pool = descriptor.file.pool
|
|
829
830
|
|
|
830
831
|
def _AddStaticMethods(cls):
|
|
832
|
+
|
|
833
|
+
def RegisterExtension(_):
|
|
834
|
+
"""no-op to keep generated code <=4.23 working with new runtimes."""
|
|
835
|
+
# This was originally removed in 5.26 (cl/595989309).
|
|
836
|
+
pass
|
|
837
|
+
|
|
838
|
+
cls.RegisterExtension = staticmethod(RegisterExtension)
|
|
831
839
|
def FromString(s):
|
|
832
840
|
message = cls()
|
|
833
841
|
message.MergeFromString(s)
|
|
@@ -1260,7 +1268,7 @@ def _AddIsInitializedMethod(message_descriptor, cls):
|
|
|
1260
1268
|
protocol message class."""
|
|
1261
1269
|
|
|
1262
1270
|
required_fields = [field for field in message_descriptor.fields
|
|
1263
|
-
if field.
|
|
1271
|
+
if field.is_required]
|
|
1264
1272
|
|
|
1265
1273
|
def IsInitialized(self, errors=None):
|
|
1266
1274
|
"""Checks if all required fields of a message are set.
|
|
@@ -113,12 +113,21 @@ class BoolValueChecker(object):
|
|
|
113
113
|
"""Type checker used for bool fields."""
|
|
114
114
|
|
|
115
115
|
def CheckValue(self, proposed_value):
|
|
116
|
-
if not hasattr(proposed_value, '__index__')
|
|
117
|
-
|
|
116
|
+
if not hasattr(proposed_value, '__index__'):
|
|
117
|
+
# Under NumPy 2.3, numpy.bool does not have an __index__ method.
|
|
118
|
+
if (type(proposed_value).__module__ == 'numpy' and
|
|
119
|
+
type(proposed_value).__name__ == 'bool'):
|
|
120
|
+
return bool(proposed_value)
|
|
121
|
+
message = ('%.1024r has type %s, but expected one of: %s' %
|
|
122
|
+
(proposed_value, type(proposed_value), (bool, int)))
|
|
123
|
+
raise TypeError(message)
|
|
124
|
+
|
|
125
|
+
if (type(proposed_value).__module__ == 'numpy' and
|
|
118
126
|
type(proposed_value).__name__ == 'ndarray'):
|
|
119
127
|
message = ('%.1024r has type %s, but expected one of: %s' %
|
|
120
128
|
(proposed_value, type(proposed_value), (bool, int)))
|
|
121
129
|
raise TypeError(message)
|
|
130
|
+
|
|
122
131
|
return bool(proposed_value)
|
|
123
132
|
|
|
124
133
|
def DefaultValue(self):
|
google/protobuf/json_format.py
CHANGED
|
@@ -72,6 +72,7 @@ class ParseError(Error):
|
|
|
72
72
|
|
|
73
73
|
class EnumStringValueParseError(ParseError):
|
|
74
74
|
"""Thrown if unknown string enum value is encountered.
|
|
75
|
+
|
|
75
76
|
This exception is suppressed if ignore_unknown_fields is set.
|
|
76
77
|
"""
|
|
77
78
|
|
|
@@ -91,10 +92,10 @@ def MessageToJson(
|
|
|
91
92
|
|
|
92
93
|
Args:
|
|
93
94
|
message: The protocol buffers message instance to serialize.
|
|
94
|
-
always_print_fields_with_no_presence: If True, fields without
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
always_print_fields_with_no_presence: If True, fields without presence
|
|
96
|
+
(implicit presence scalars, repeated fields, and map fields) will always
|
|
97
|
+
be serialized. Any field that supports presence is not affected by this
|
|
98
|
+
option (including singular message fields and oneof fields).
|
|
98
99
|
preserving_proto_field_name: If True, use the original proto field names as
|
|
99
100
|
defined in the .proto file. If False, convert the field names to
|
|
100
101
|
lowerCamelCase.
|
|
@@ -105,7 +106,8 @@ def MessageToJson(
|
|
|
105
106
|
use_integers_for_enums: If true, print integers instead of enum names.
|
|
106
107
|
descriptor_pool: A Descriptor Pool for resolving types. If None use the
|
|
107
108
|
default.
|
|
108
|
-
float_precision: If set, use this to specify float field valid
|
|
109
|
+
float_precision: Deprecated. If set, use this to specify float field valid
|
|
110
|
+
digits.
|
|
109
111
|
ensure_ascii: If True, strings with non-ASCII characters are escaped. If
|
|
110
112
|
False, Unicode strings are returned unchanged.
|
|
111
113
|
|
|
@@ -117,7 +119,7 @@ def MessageToJson(
|
|
|
117
119
|
use_integers_for_enums,
|
|
118
120
|
descriptor_pool,
|
|
119
121
|
float_precision,
|
|
120
|
-
always_print_fields_with_no_presence
|
|
122
|
+
always_print_fields_with_no_presence,
|
|
121
123
|
)
|
|
122
124
|
return printer.ToJsonString(message, indent, sort_keys, ensure_ascii)
|
|
123
125
|
|
|
@@ -136,17 +138,18 @@ def MessageToDict(
|
|
|
136
138
|
|
|
137
139
|
Args:
|
|
138
140
|
message: The protocol buffers message instance to serialize.
|
|
139
|
-
always_print_fields_with_no_presence: If True, fields without
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
always_print_fields_with_no_presence: If True, fields without presence
|
|
142
|
+
(implicit presence scalars, repeated fields, and map fields) will always
|
|
143
|
+
be serialized. Any field that supports presence is not affected by this
|
|
144
|
+
option (including singular message fields and oneof fields).
|
|
143
145
|
preserving_proto_field_name: If True, use the original proto field names as
|
|
144
146
|
defined in the .proto file. If False, convert the field names to
|
|
145
147
|
lowerCamelCase.
|
|
146
148
|
use_integers_for_enums: If true, print integers instead of enum names.
|
|
147
149
|
descriptor_pool: A Descriptor Pool for resolving types. If None use the
|
|
148
150
|
default.
|
|
149
|
-
float_precision: If set, use this to specify float field valid
|
|
151
|
+
float_precision: Deprecated. If set, use this to specify float field valid
|
|
152
|
+
digits.
|
|
150
153
|
|
|
151
154
|
Returns:
|
|
152
155
|
A dict representation of the protocol buffer message.
|
|
@@ -233,7 +236,7 @@ class _Printer(object):
|
|
|
233
236
|
recorded_key = str(key)
|
|
234
237
|
js_map[recorded_key] = self._FieldToJsonObject(v_field, value[key])
|
|
235
238
|
js[name] = js_map
|
|
236
|
-
elif field.
|
|
239
|
+
elif field.is_repeated:
|
|
237
240
|
# Convert a repeated field.
|
|
238
241
|
js[name] = [self._FieldToJsonObject(field, k) for k in value]
|
|
239
242
|
elif field.is_extension:
|
|
@@ -251,10 +254,7 @@ class _Printer(object):
|
|
|
251
254
|
|
|
252
255
|
# always_print_fields_with_no_presence doesn't apply to
|
|
253
256
|
# any field which supports presence.
|
|
254
|
-
if
|
|
255
|
-
self.always_print_fields_with_no_presence
|
|
256
|
-
and field.has_presence
|
|
257
|
-
):
|
|
257
|
+
if self.always_print_fields_with_no_presence and field.has_presence:
|
|
258
258
|
continue
|
|
259
259
|
|
|
260
260
|
if self.preserving_proto_field_name:
|
|
@@ -266,7 +266,7 @@ class _Printer(object):
|
|
|
266
266
|
continue
|
|
267
267
|
if _IsMapEntry(field):
|
|
268
268
|
js[name] = {}
|
|
269
|
-
elif field.
|
|
269
|
+
elif field.is_repeated:
|
|
270
270
|
js[name] = []
|
|
271
271
|
else:
|
|
272
272
|
js[name] = self._FieldToJsonObject(field, field.default_value)
|
|
@@ -636,7 +636,7 @@ class _Parser(object):
|
|
|
636
636
|
self._ConvertMapFieldValue(
|
|
637
637
|
value, message, field, '{0}.{1}'.format(path, name)
|
|
638
638
|
)
|
|
639
|
-
elif field.
|
|
639
|
+
elif field.is_repeated:
|
|
640
640
|
message.ClearField(field.name)
|
|
641
641
|
if not isinstance(value, _LIST_LIKE):
|
|
642
642
|
raise ParseError(
|
|
@@ -674,7 +674,8 @@ class _Parser(object):
|
|
|
674
674
|
)
|
|
675
675
|
)
|
|
676
676
|
self._ConvertAndAppendScalar(
|
|
677
|
-
|
|
677
|
+
message, field, item, '{0}.{1}[{2}]'.format(path, name, index)
|
|
678
|
+
)
|
|
678
679
|
elif field.cpp_type == descriptor.FieldDescriptor.CPPTYPE_MESSAGE:
|
|
679
680
|
if field.is_extension:
|
|
680
681
|
sub_message = message.Extensions[field]
|
|
@@ -684,9 +685,13 @@ class _Parser(object):
|
|
|
684
685
|
self.ConvertMessage(value, sub_message, '{0}.{1}'.format(path, name))
|
|
685
686
|
else:
|
|
686
687
|
if field.is_extension:
|
|
687
|
-
self._ConvertAndSetScalarExtension(
|
|
688
|
+
self._ConvertAndSetScalarExtension(
|
|
689
|
+
message, field, value, '{0}.{1}'.format(path, name)
|
|
690
|
+
)
|
|
688
691
|
else:
|
|
689
|
-
self._ConvertAndSetScalar(
|
|
692
|
+
self._ConvertAndSetScalar(
|
|
693
|
+
message, field, value, '{0}.{1}'.format(path, name)
|
|
694
|
+
)
|
|
690
695
|
except ParseError as e:
|
|
691
696
|
if field and field.containing_oneof is None:
|
|
692
697
|
raise ParseError(
|
|
@@ -801,7 +806,9 @@ class _Parser(object):
|
|
|
801
806
|
def _ConvertWrapperMessage(self, value, message, path):
|
|
802
807
|
"""Convert a JSON representation into Wrapper message."""
|
|
803
808
|
field = message.DESCRIPTOR.fields_by_name['value']
|
|
804
|
-
self._ConvertAndSetScalar(
|
|
809
|
+
self._ConvertAndSetScalar(
|
|
810
|
+
message, field, value, path='{0}.value'.format(path)
|
|
811
|
+
)
|
|
805
812
|
|
|
806
813
|
def _ConvertMapFieldValue(self, value, message, field, path):
|
|
807
814
|
"""Convert map field value for a message map field.
|
|
@@ -839,13 +846,17 @@ class _Parser(object):
|
|
|
839
846
|
field,
|
|
840
847
|
key_value,
|
|
841
848
|
value[key],
|
|
842
|
-
path='{0}[{1}]'.format(path, key_value)
|
|
849
|
+
path='{0}[{1}]'.format(path, key_value),
|
|
850
|
+
)
|
|
843
851
|
|
|
844
|
-
def _ConvertAndSetScalarExtension(
|
|
852
|
+
def _ConvertAndSetScalarExtension(
|
|
853
|
+
self, message, extension_field, js_value, path
|
|
854
|
+
):
|
|
845
855
|
"""Convert scalar from js_value and assign it to message.Extensions[extension_field]."""
|
|
846
856
|
try:
|
|
847
857
|
message.Extensions[extension_field] = _ConvertScalarFieldValue(
|
|
848
|
-
js_value, extension_field, path
|
|
858
|
+
js_value, extension_field, path
|
|
859
|
+
)
|
|
849
860
|
except EnumStringValueParseError:
|
|
850
861
|
if not self.ignore_unknown_fields:
|
|
851
862
|
raise
|
|
@@ -854,9 +865,8 @@ class _Parser(object):
|
|
|
854
865
|
"""Convert scalar from js_value and assign it to message.field."""
|
|
855
866
|
try:
|
|
856
867
|
setattr(
|
|
857
|
-
message,
|
|
858
|
-
|
|
859
|
-
_ConvertScalarFieldValue(js_value, field, path))
|
|
868
|
+
message, field.name, _ConvertScalarFieldValue(js_value, field, path)
|
|
869
|
+
)
|
|
860
870
|
except EnumStringValueParseError:
|
|
861
871
|
if not self.ignore_unknown_fields:
|
|
862
872
|
raise
|
|
@@ -865,16 +875,23 @@ class _Parser(object):
|
|
|
865
875
|
"""Convert scalar from js_value and append it to message.repeated_field."""
|
|
866
876
|
try:
|
|
867
877
|
getattr(message, repeated_field.name).append(
|
|
868
|
-
_ConvertScalarFieldValue(js_value, repeated_field, path)
|
|
878
|
+
_ConvertScalarFieldValue(js_value, repeated_field, path)
|
|
879
|
+
)
|
|
869
880
|
except EnumStringValueParseError:
|
|
870
881
|
if not self.ignore_unknown_fields:
|
|
871
882
|
raise
|
|
872
883
|
|
|
873
|
-
def _ConvertAndSetScalarToMapKey(
|
|
884
|
+
def _ConvertAndSetScalarToMapKey(
|
|
885
|
+
self, message, map_field, converted_key, js_value, path
|
|
886
|
+
):
|
|
874
887
|
"""Convert scalar from 'js_value' and add it to message.map_field[converted_key]."""
|
|
875
888
|
try:
|
|
876
|
-
getattr(message, map_field.name)[converted_key] =
|
|
877
|
-
|
|
889
|
+
getattr(message, map_field.name)[converted_key] = (
|
|
890
|
+
_ConvertScalarFieldValue(
|
|
891
|
+
js_value,
|
|
892
|
+
map_field.message_type.fields_by_name['value'],
|
|
893
|
+
path,
|
|
894
|
+
)
|
|
878
895
|
)
|
|
879
896
|
except EnumStringValueParseError:
|
|
880
897
|
if not self.ignore_unknown_fields:
|
|
@@ -28,9 +28,9 @@ class Domain(Enum):
|
|
|
28
28
|
# These OSS versions are not stripped to avoid merging conflicts.
|
|
29
29
|
OSS_DOMAIN = Domain.PUBLIC
|
|
30
30
|
OSS_MAJOR = 6
|
|
31
|
-
OSS_MINOR =
|
|
31
|
+
OSS_MINOR = 32
|
|
32
32
|
OSS_PATCH = 0
|
|
33
|
-
OSS_SUFFIX = '-
|
|
33
|
+
OSS_SUFFIX = '-rc1'
|
|
34
34
|
|
|
35
35
|
DOMAIN = OSS_DOMAIN
|
|
36
36
|
MAJOR = OSS_MAJOR
|
|
@@ -92,33 +92,13 @@ def ValidateProtobufRuntimeVersion(
|
|
|
92
92
|
' Cross-domain usage of Protobuf is not supported.'
|
|
93
93
|
)
|
|
94
94
|
|
|
95
|
-
if
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
' than the runtime version %s at %s. Please update the gencode to'
|
|
101
|
-
' avoid compatibility violations in the next runtime release.'
|
|
102
|
-
% (gen_version, version, location)
|
|
103
|
-
)
|
|
104
|
-
_warning_count += 1
|
|
105
|
-
else:
|
|
106
|
-
_ReportVersionError(
|
|
107
|
-
'Detected mismatched Protobuf Gencode/Runtime major versions when'
|
|
108
|
-
f' loading {location}: gencode {gen_version} runtime {version}.'
|
|
109
|
-
f' Same major version is required. {error_prompt}'
|
|
110
|
-
)
|
|
111
|
-
|
|
112
|
-
if MINOR < gen_minor or (MINOR == gen_minor and PATCH < gen_patch):
|
|
95
|
+
if (
|
|
96
|
+
MAJOR < gen_major
|
|
97
|
+
or (MAJOR == gen_major and MINOR < gen_minor)
|
|
98
|
+
or (MAJOR == gen_major and MINOR == gen_minor and PATCH < gen_patch)
|
|
99
|
+
):
|
|
113
100
|
_ReportVersionError(
|
|
114
101
|
'Detected incompatible Protobuf Gencode/Runtime versions when loading'
|
|
115
102
|
f' {location}: gencode {gen_version} runtime {version}. Runtime version'
|
|
116
103
|
f' cannot be older than the linked gencode version. {error_prompt}'
|
|
117
104
|
)
|
|
118
|
-
|
|
119
|
-
if gen_suffix != SUFFIX:
|
|
120
|
-
_ReportVersionError(
|
|
121
|
-
'Detected mismatched Protobuf Gencode/Runtime version suffixes when'
|
|
122
|
-
f' loading {location}: gencode {gen_version} runtime {version}.'
|
|
123
|
-
f' Version suffixes must be the same. {error_prompt}'
|
|
124
|
-
)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
4
|
# source: google/protobuf/source_context.proto
|
|
5
|
-
# Protobuf Python Version: 6.
|
|
5
|
+
# Protobuf Python Version: 6.32.0-rc1
|
|
6
6
|
"""Generated protocol buffer code."""
|
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
|
8
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -12,9 +12,9 @@ from google.protobuf.internal import builder as _builder
|
|
|
12
12
|
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
|
14
14
|
6,
|
|
15
|
-
|
|
15
|
+
32,
|
|
16
16
|
0,
|
|
17
|
-
'-
|
|
17
|
+
'-rc1',
|
|
18
18
|
'google/protobuf/source_context.proto'
|
|
19
19
|
)
|
|
20
20
|
# @@protoc_insertion_point(imports)
|
google/protobuf/struct_pb2.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
4
|
# source: google/protobuf/struct.proto
|
|
5
|
-
# Protobuf Python Version: 6.
|
|
5
|
+
# Protobuf Python Version: 6.32.0-rc1
|
|
6
6
|
"""Generated protocol buffer code."""
|
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
|
8
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -12,9 +12,9 @@ from google.protobuf.internal import builder as _builder
|
|
|
12
12
|
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
|
14
14
|
6,
|
|
15
|
-
|
|
15
|
+
32,
|
|
16
16
|
0,
|
|
17
|
-
'-
|
|
17
|
+
'-rc1',
|
|
18
18
|
'google/protobuf/struct.proto'
|
|
19
19
|
)
|
|
20
20
|
# @@protoc_insertion_point(imports)
|
google/protobuf/text_format.py
CHANGED
|
@@ -126,13 +126,13 @@ def MessageToString(
|
|
|
126
126
|
will be printed at the end of the message and their relative order is
|
|
127
127
|
determined by the extension number. By default, use the field number
|
|
128
128
|
order.
|
|
129
|
-
float_format (str): If set, use this to specify float field
|
|
130
|
-
(per the "Format Specification Mini-Language"); otherwise,
|
|
131
|
-
that has same value in wire will be printed. Also affect
|
|
132
|
-
if double_format is not set but float_format is set.
|
|
133
|
-
double_format (str): If set, use this to specify double field
|
|
134
|
-
(per the "Format Specification Mini-Language"); if it is not
|
|
135
|
-
float_format is set, use float_format. Otherwise, use ``str()``
|
|
129
|
+
float_format (str): Deprecated. If set, use this to specify float field
|
|
130
|
+
formatting (per the "Format Specification Mini-Language"); otherwise,
|
|
131
|
+
shortest float that has same value in wire will be printed. Also affect
|
|
132
|
+
double field if double_format is not set but float_format is set.
|
|
133
|
+
double_format (str): Deprecated. If set, use this to specify double field
|
|
134
|
+
formatting (per the "Format Specification Mini-Language"); if it is not
|
|
135
|
+
set but float_format is set, use float_format. Otherwise, use ``str()``
|
|
136
136
|
use_field_number: If True, print field numbers instead of names.
|
|
137
137
|
descriptor_pool (DescriptorPool): Descriptor pool used to resolve Any types.
|
|
138
138
|
indent (int): The initial indent level, in terms of spaces, for pretty
|
|
@@ -391,13 +391,13 @@ class _Printer(object):
|
|
|
391
391
|
use_index_order: If True, print fields of a proto message using the order
|
|
392
392
|
defined in source code instead of the field number. By default, use the
|
|
393
393
|
field number order.
|
|
394
|
-
float_format: If set, use this to specify float field
|
|
395
|
-
(per the "Format Specification Mini-Language"); otherwise,
|
|
396
|
-
float that has same value in wire will be printed. Also affect
|
|
397
|
-
field if double_format is not set but float_format is set.
|
|
398
|
-
double_format: If set, use this to specify double field
|
|
399
|
-
(per the "Format Specification Mini-Language"); if it is not
|
|
400
|
-
float_format is set, use float_format. Otherwise, str() is used.
|
|
394
|
+
float_format: Deprecated. If set, use this to specify float field
|
|
395
|
+
formatting (per the "Format Specification Mini-Language"); otherwise,
|
|
396
|
+
shortest float that has same value in wire will be printed. Also affect
|
|
397
|
+
double field if double_format is not set but float_format is set.
|
|
398
|
+
double_format: Deprecated. If set, use this to specify double field
|
|
399
|
+
formatting (per the "Format Specification Mini-Language"); if it is not
|
|
400
|
+
set but float_format is set, use float_format. Otherwise, str() is used.
|
|
401
401
|
use_field_number: If True, print field numbers instead of names.
|
|
402
402
|
descriptor_pool: A DescriptorPool used to resolve Any types.
|
|
403
403
|
message_formatter: A function(message, indent, as_one_line): unicode|None
|
|
@@ -477,7 +477,7 @@ class _Printer(object):
|
|
|
477
477
|
# TODO: refactor and optimize if this becomes an issue.
|
|
478
478
|
entry_submsg = value.GetEntryClass()(key=key, value=value[key])
|
|
479
479
|
self.PrintField(field, entry_submsg)
|
|
480
|
-
elif field.
|
|
480
|
+
elif field.is_repeated:
|
|
481
481
|
if (self.use_short_repeated_primitives
|
|
482
482
|
and field.cpp_type != descriptor.FieldDescriptor.CPPTYPE_MESSAGE
|
|
483
483
|
and field.cpp_type != descriptor.FieldDescriptor.CPPTYPE_STRING):
|
|
@@ -557,7 +557,8 @@ class _Printer(object):
|
|
|
557
557
|
out.write('[')
|
|
558
558
|
if (field.containing_type.GetOptions().message_set_wire_format and
|
|
559
559
|
field.type == descriptor.FieldDescriptor.TYPE_MESSAGE and
|
|
560
|
-
field.
|
|
560
|
+
not field.is_required and
|
|
561
|
+
not field.is_repeated):
|
|
561
562
|
out.write(field.message_type.full_name)
|
|
562
563
|
else:
|
|
563
564
|
out.write(field.full_name)
|
|
@@ -998,7 +999,7 @@ class _Parser(object):
|
|
|
998
999
|
field.full_name)
|
|
999
1000
|
merger = self._MergeScalarField
|
|
1000
1001
|
|
|
1001
|
-
if (field.
|
|
1002
|
+
if (field.is_repeated and
|
|
1002
1003
|
tokenizer.TryConsume('[')):
|
|
1003
1004
|
# Short repeated format, e.g. "foo: [1, 2, 3]"
|
|
1004
1005
|
if not tokenizer.TryConsume(']'):
|
|
@@ -1061,7 +1062,7 @@ class _Parser(object):
|
|
|
1061
1062
|
tokenizer.Consume('{')
|
|
1062
1063
|
end_token = '}'
|
|
1063
1064
|
|
|
1064
|
-
if field.
|
|
1065
|
+
if field.is_repeated:
|
|
1065
1066
|
if field.is_extension:
|
|
1066
1067
|
sub_message = message.Extensions[field].add()
|
|
1067
1068
|
elif is_map_entry:
|
|
@@ -1143,7 +1144,7 @@ class _Parser(object):
|
|
|
1143
1144
|
else:
|
|
1144
1145
|
raise RuntimeError('Unknown field type %d' % field.type)
|
|
1145
1146
|
|
|
1146
|
-
if field.
|
|
1147
|
+
if field.is_repeated:
|
|
1147
1148
|
if field.is_extension:
|
|
1148
1149
|
message.Extensions[field].append(value)
|
|
1149
1150
|
else:
|
google/protobuf/timestamp_pb2.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
4
|
# source: google/protobuf/timestamp.proto
|
|
5
|
-
# Protobuf Python Version: 6.
|
|
5
|
+
# Protobuf Python Version: 6.32.0-rc1
|
|
6
6
|
"""Generated protocol buffer code."""
|
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
|
8
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -12,9 +12,9 @@ from google.protobuf.internal import builder as _builder
|
|
|
12
12
|
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
|
14
14
|
6,
|
|
15
|
-
|
|
15
|
+
32,
|
|
16
16
|
0,
|
|
17
|
-
'-
|
|
17
|
+
'-rc1',
|
|
18
18
|
'google/protobuf/timestamp.proto'
|
|
19
19
|
)
|
|
20
20
|
# @@protoc_insertion_point(imports)
|
google/protobuf/type_pb2.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
4
|
# source: google/protobuf/type.proto
|
|
5
|
-
# Protobuf Python Version: 6.
|
|
5
|
+
# Protobuf Python Version: 6.32.0-rc1
|
|
6
6
|
"""Generated protocol buffer code."""
|
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
|
8
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -12,9 +12,9 @@ from google.protobuf.internal import builder as _builder
|
|
|
12
12
|
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
|
14
14
|
6,
|
|
15
|
-
|
|
15
|
+
32,
|
|
16
16
|
0,
|
|
17
|
-
'-
|
|
17
|
+
'-rc1',
|
|
18
18
|
'google/protobuf/type.proto'
|
|
19
19
|
)
|
|
20
20
|
# @@protoc_insertion_point(imports)
|
google/protobuf/wrappers_pb2.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
4
|
# source: google/protobuf/wrappers.proto
|
|
5
|
-
# Protobuf Python Version: 6.
|
|
5
|
+
# Protobuf Python Version: 6.32.0-rc1
|
|
6
6
|
"""Generated protocol buffer code."""
|
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
|
8
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -12,9 +12,9 @@ from google.protobuf.internal import builder as _builder
|
|
|
12
12
|
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
|
14
14
|
6,
|
|
15
|
-
|
|
15
|
+
32,
|
|
16
16
|
0,
|
|
17
|
-
'-
|
|
17
|
+
'-rc1',
|
|
18
18
|
'google/protobuf/wrappers.proto'
|
|
19
19
|
)
|
|
20
20
|
# @@protoc_insertion_point(imports)
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
google/protobuf/__init__.py,sha256=
|
|
1
|
+
google/protobuf/__init__.py,sha256=wMO288LMIqgJAMyG1n6VHZFr-6M2kDBN9FOqb9ndggI,349
|
|
2
2
|
google/protobuf/any.py,sha256=37npo8IyL1i9heh7Dxih_RKQE2BKFuv7m9NXbWxoSdo,1319
|
|
3
3
|
google/protobuf/compiler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
google/protobuf/descriptor.py,sha256=
|
|
4
|
+
google/protobuf/descriptor.py,sha256=h69lWJP0qsxrpA659qda5IxwvIdFC1eqnkZxe7u-bTI,53428
|
|
5
5
|
google/protobuf/descriptor_database.py,sha256=FHAOZc5uz86IsMqr3Omc19AenuwrOknut2wCQ0mGsGc,5936
|
|
6
|
-
google/protobuf/descriptor_pool.py,sha256=
|
|
6
|
+
google/protobuf/descriptor_pool.py,sha256=SV_5FYtwXsqVrc4Z3Shfgtb7R_IrnXLkvdKAqHhMxcA,48793
|
|
7
7
|
google/protobuf/duration.py,sha256=vQTwVyiiyGm3Wy3LW8ohA3tkGkrUKoTn_p4SdEBU8bM,2672
|
|
8
8
|
google/protobuf/internal/__init__.py,sha256=8d_k1ksNWIuqPDEEEtOjgC3Xx8kAXD2-04R7mxJlSbs,272
|
|
9
|
-
google/protobuf/internal/api_implementation.py,sha256=
|
|
9
|
+
google/protobuf/internal/api_implementation.py,sha256=EQ7EImSxJDLiM3AXoQwuuD7K0Lz50072CS1trt2bzqo,4669
|
|
10
10
|
google/protobuf/internal/builder.py,sha256=VPnrHqqt6J66RwZe19hLm01Zl1vP_jFKpL-bC8nEncY,4112
|
|
11
11
|
google/protobuf/internal/containers.py,sha256=xC6yATB8GxCAlVQtZj0QIfSPcGORJb0kDxoWAKRV7YQ,22175
|
|
12
|
-
google/protobuf/internal/decoder.py,sha256=
|
|
12
|
+
google/protobuf/internal/decoder.py,sha256=TwaTXm9Ioew3oO3Wa1hgVYLiHVe7BFdF4NAsjv2FyGs,37588
|
|
13
13
|
google/protobuf/internal/encoder.py,sha256=Vujp3bU10dLBasUnRaGZKD-ZTLq7zEGA8wKh7mVLR-g,27297
|
|
14
14
|
google/protobuf/internal/enum_type_wrapper.py,sha256=PNhK87a_NP1JIfFHuYFibpE4hHdHYawXwqZxMEtvsvo,3747
|
|
15
|
-
google/protobuf/internal/extension_dict.py,sha256=
|
|
16
|
-
google/protobuf/internal/field_mask.py,sha256=
|
|
15
|
+
google/protobuf/internal/extension_dict.py,sha256=4af0h32jq5BwL7uB6ym3ipdzz3kTH75WGMHLHluGsNA,7141
|
|
16
|
+
google/protobuf/internal/field_mask.py,sha256=QbOfhzKaTkvYR9k7HYigVidVgyobBRUicBibO71ufHo,10442
|
|
17
17
|
google/protobuf/internal/message_listener.py,sha256=uh8viU_MvWdDe4Kl14CromKVFAzBMPlMzFZ4vew_UJc,2008
|
|
18
18
|
google/protobuf/internal/python_edition_defaults.py,sha256=5IfHLtwgkkQt0ghUZ7TP9m-P1w0Iy7xXPvSwFsSRmC4,464
|
|
19
|
-
google/protobuf/internal/python_message.py,sha256=
|
|
19
|
+
google/protobuf/internal/python_message.py,sha256=R4K1To2F9pVh_MLM8C321oWRghUAVelHgONiPEW8EVo,57898
|
|
20
20
|
google/protobuf/internal/testing_refleaks.py,sha256=VnitLBTnynWcayPsvHlScMZCczZs7vf0_x8csPFBxBg,4495
|
|
21
|
-
google/protobuf/internal/type_checkers.py,sha256=
|
|
21
|
+
google/protobuf/internal/type_checkers.py,sha256=wJWv5l_B5nKxBlTO-ewKEhlRsE0dn7WWH2AQTRLPs1M,16074
|
|
22
22
|
google/protobuf/internal/well_known_types.py,sha256=b2MhbOXaQY8FRzpiTGcUT16R9DKhZEeEj3xBkYNdwAk,22850
|
|
23
23
|
google/protobuf/internal/wire_format.py,sha256=EbAXZdb23iCObCZxNgaMx8-VRF2UjgyPrBCTtV10Rx8,7087
|
|
24
|
-
google/protobuf/json_format.py,sha256=
|
|
24
|
+
google/protobuf/json_format.py,sha256=ANZbio4Mq4PeKBOu-Vm7Kqdoa7NBByMWnJI683AVUjc,37796
|
|
25
25
|
google/protobuf/message.py,sha256=IeyQE68rj_YcUhy20XS5Dr3tU27_JYZ5GLLHm-TbbD4,14917
|
|
26
26
|
google/protobuf/message_factory.py,sha256=uELqRiWo-3pBJupnQTlHsGJmgDJ3p4HqX3T7d46MMug,6607
|
|
27
27
|
google/protobuf/proto.py,sha256=cuqMtlacasjTNQdfyKiTubEKXNapgdAEcnQTv65AmoE,4389
|
|
@@ -31,28 +31,28 @@ google/protobuf/proto_text.py,sha256=ZD21wifWF_HVMcJkVJBo3jGNFxqELCrgOeIshuz565U
|
|
|
31
31
|
google/protobuf/pyext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
google/protobuf/pyext/cpp_message.py,sha256=8uSrWX9kD3HPRhntvTPc4bgnfQ2BzX9FPC73CgifXAw,1715
|
|
33
33
|
google/protobuf/reflection.py,sha256=gMVfWDmnckEbp4vTR5gKq2HDwRb_eI5rfylZOoFSmEQ,1241
|
|
34
|
-
google/protobuf/runtime_version.py,sha256=
|
|
34
|
+
google/protobuf/runtime_version.py,sha256=QoPVZeI3jfIJBDNLSHBKEgjUJyuDWrXoWsvAOyCGn-k,3037
|
|
35
35
|
google/protobuf/service_reflection.py,sha256=WHElGnPgywDtn3X8xKVNsZZOCgJOTzgpAyTd-rmCKGU,10058
|
|
36
36
|
google/protobuf/symbol_database.py,sha256=s0pExuYyJvi1q0pD82AEoJtH2EDZ2vAZCIqja84CKcc,5752
|
|
37
37
|
google/protobuf/testdata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
38
|
google/protobuf/text_encoding.py,sha256=Ao1Q6OP8i4p8VDtvpe8uW1BjX7aQZvkJggvhFYYrB7w,3621
|
|
39
|
-
google/protobuf/text_format.py,sha256=
|
|
39
|
+
google/protobuf/text_format.py,sha256=afmHW6cwwHUL5acNDdWjKOPayXqpC5cDfQPOFz1VpTU,63779
|
|
40
40
|
google/protobuf/timestamp.py,sha256=s23LWq6hDiFIeAtVUn8LwfEc5aRM7WAwTz_hCaOVndk,3133
|
|
41
41
|
google/protobuf/unknown_fields.py,sha256=r3CJ2e4_XUq41TcgB8w6E0yZxxzSTCQLF4C7OOHa9lo,3065
|
|
42
42
|
google/protobuf/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
|
-
google/protobuf/any_pb2.py,sha256=
|
|
44
|
-
google/protobuf/api_pb2.py,sha256=
|
|
45
|
-
google/protobuf/compiler/plugin_pb2.py,sha256=
|
|
46
|
-
google/protobuf/descriptor_pb2.py,sha256=
|
|
47
|
-
google/protobuf/duration_pb2.py,sha256=
|
|
48
|
-
google/protobuf/empty_pb2.py,sha256=
|
|
49
|
-
google/protobuf/field_mask_pb2.py,sha256
|
|
50
|
-
google/protobuf/source_context_pb2.py,sha256=
|
|
51
|
-
google/protobuf/struct_pb2.py,sha256=
|
|
52
|
-
google/protobuf/timestamp_pb2.py,sha256=
|
|
53
|
-
google/protobuf/type_pb2.py,sha256=
|
|
54
|
-
google/protobuf/wrappers_pb2.py,sha256=
|
|
55
|
-
protobuf-6.
|
|
56
|
-
protobuf-6.
|
|
57
|
-
protobuf-6.
|
|
58
|
-
protobuf-6.
|
|
43
|
+
google/protobuf/any_pb2.py,sha256=coLtKksZxgQavMAjBbCtkfu3ojf-8CklouXjOCvdqlk,1733
|
|
44
|
+
google/protobuf/api_pb2.py,sha256=N5xF_frPFbaVYnKlOYzbOtITLGx0kk-0ZasDRqKNV5M,3608
|
|
45
|
+
google/protobuf/compiler/plugin_pb2.py,sha256=UXsM4sITDLDcXFx8GtJOoqiBDPQyhL1tm4EJQQPqvJg,3805
|
|
46
|
+
google/protobuf/descriptor_pb2.py,sha256=8xT4zAL-NtD-n4krP-OWV9xp_N1S4HPKfe2uF_Mhijs,366104
|
|
47
|
+
google/protobuf/duration_pb2.py,sha256=hsJ-j0BAyVXjmkADYDLSCBM2P6jqWn4DQP9EbDEStio,1813
|
|
48
|
+
google/protobuf/empty_pb2.py,sha256=cePVCYltdXYnAoN1SAg8UUr0OI6aXjtczqtXcX9T00I,1677
|
|
49
|
+
google/protobuf/field_mask_pb2.py,sha256=rlgVlK2ciRpvyMFJYDcyqR9KpCR3dLQ43rih3aJ2Xrc,1773
|
|
50
|
+
google/protobuf/source_context_pb2.py,sha256=v9g1XhBiTuQBmZadD5KaxHAHriK0SQPPzn3QBYa3gNc,1799
|
|
51
|
+
google/protobuf/struct_pb2.py,sha256=ZGvLDk3E-eKTN4Voiey1kgmZZW4wDzCiD2ZHQSgbzyM,3069
|
|
52
|
+
google/protobuf/timestamp_pb2.py,sha256=Sh-d1PovRHogQ2ST8r27VFnzsq135VZIc8isXl2zYSU,1823
|
|
53
|
+
google/protobuf/type_pb2.py,sha256=Hx9zzKJqmPd7DuG1N87aDcYDIeQU_IFDZ5WrRFaWh70,5446
|
|
54
|
+
google/protobuf/wrappers_pb2.py,sha256=cf_08s941GQSXE5qvFdB-ZQ0Mu_wePSMviiZBiIa2zA,3045
|
|
55
|
+
protobuf-6.32.0rc1.dist-info/WHEEL,sha256=sobxWSyDDkdg_rinUth-jxhXHqoNqlmNMJY3aTZn2Us,91
|
|
56
|
+
protobuf-6.32.0rc1.dist-info/METADATA,sha256=tCtxVaTF0imLJC8MKq00H-unAjG1raHFTmj2k72FTPY,596
|
|
57
|
+
protobuf-6.32.0rc1.dist-info/LICENSE,sha256=bl4RcySv2UTc9n82zzKYQ7wakiKajNm7Vz16gxMP6n0,1732
|
|
58
|
+
protobuf-6.32.0rc1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|