Skip to content

Upgrading protobuf 4 to 5

Unknown4.25.9 → 5.29.6Security2

UnknownUpgrade verdict

DepDelta hasn't looked for this range's notes yet, so breaking changes can't be ruled out.

  • DepDelta hasn't finished looking for the notes in this range, so it can't rule out breaking changes yet.
2 items need code or config changes
Security2
protobuf affected by a JSON recursion depth bypass
protobuf-python has a potential Denial of Service issue

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • added: function is_type(any_msg: Any, des: descriptor.Descriptor) -> bool
  • added: function pack(msg: Message, type_url_prefix: Optional[str]=…, deterministic: Optional[bool]=…) -> Any
  • added: function type_name(any_msg: Any) -> str
  • added: function unpack(any_msg: Any, msg: Message) -> bool
  • removed: property Descriptor.syntax
  • removed: property FileDescriptor.syntax
  • changed: constructor FileDescriptor(name, package, options=…, serialized_options=…, serialized_pb=…, dependencies=…, public_dependencies=…, syntax=…, pool=…, create_key=…) → constructor FileDescriptor(name, package, options=…, serialized_options=…, serialized_pb=…, dependencies=…, public_dependencies=…, syntax=…, edition=…, pool=…, create_key=…)
  • changed: function MakeDescriptor(desc_proto, package=…, build_file_if_cpp=…, syntax=…) → function MakeDescriptor(desc_proto, package=…, build_file_if_cpp=…, syntax=…, edition=…, file_desc=…)
  • added: property FieldDescriptor.label
  • added: property FieldDescriptor.type
  • removed: method DescriptorPool.AddDescriptor(desc)
  • removed: method DescriptorPool.AddExtensionDescriptor(extension)
  • removed: method DescriptorPool.AddFileDescriptor(file_desc)
  • removed: method DescriptorPool.AddServiceDescriptor(service_desc)
  • added: method DescriptorPool.SetFeatureSetDefaults(defaults)
  • added: function from_json_string(value: str) -> Duration
  • added: function from_microseconds(micros: float) -> Duration
  • added: function from_milliseconds(millis: float) -> Duration
  • added: function from_nanoseconds(nanos: float) -> Duration
  • added: function from_seconds(seconds: float) -> Duration
  • added: function from_timedelta(td: datetime.timedelta) -> Duration
  • added: function to_json_string(duration: Duration) -> str
  • added: function to_microseconds(duration: Duration) -> int
  • added: function to_milliseconds(duration: Duration) -> int
  • added: function to_nanoseconds(duration: Duration) -> int
  • added: function to_seconds(duration: Duration) -> int
  • added: function to_timedelta(duration: Duration) -> datetime.timedelta
  • changed: method Duration.ToTimedelta() → method Duration.ToTimedelta() -> datetime.timedelta
  • changed: function MessageToDict(message, including_default_value_fields=…, preserving_proto_field_name=…, use_integers_for_enums=…, descriptor_pool=…, float_precision=…) → function MessageToDict(message, always_print_fields_with_no_presence=…, preserving_proto_field_name=…, use_integers_for_enums=…, descriptor_pool=…, float_precision=…)
  • changed: function MessageToJson(message, including_default_value_fields=…, preserving_proto_field_name=…, indent=…, sort_keys=…, use_integers_for_enums=…, descriptor_pool=…, float_precision=…, ensure_ascii=…) → function MessageToJson(message, preserving_proto_field_name=…, indent=…, sort_keys=…, use_integers_for_enums=…, descriptor_pool=…, float_precision=…, ensure_ascii=…, always_print_fields_with_no_presence=…)
  • added: class EnumStringValueParseError(ParseError)
  • removed: static method Message.RegisterExtension(field_descriptor)
  • added: function parse(message_class: Type[_MESSAGE], payload: bytes) -> _MESSAGE
  • added: function parse_length_prefixed(message_class: Type[_MESSAGE], input_bytes: io.BytesIO) -> _MESSAGE
  • added: function serialize(message: _MESSAGE, deterministic: bool=…) -> bytes
  • added: function serialize_length_prefixed(message: _MESSAGE, output: io.BytesIO) -> None
  • added: function parse(message_class: Type[Message], js_dict: dict, ignore_unknown_fields: bool=…, descriptor_pool: Optional[DescriptorPool]=…, max_recursion_depth: int=…) -> Message
  • added: function serialize(message: Message, always_print_fields_with_no_presence: bool=…, preserving_proto_field_name: bool=…, use_integers_for_enums: bool=…, descriptor_pool: Optional[DescriptorPool]=…, float_precision: int=…) -> dict
  • added: class Domain(Enum)
  • added: class VersionError(Exception)
  • added: field Domain.GOOGLE_INTERNAL
  • added: field Domain.PUBLIC
  • added: function ValidateProtobufRuntimeVersion(gen_domain, gen_major, gen_minor, gen_patch, gen_suffix, location)
  • added: variable DOMAIN
  • added: variable MAJOR
  • added: variable MINOR
  • added: variable OSS_DOMAIN
  • added: variable OSS_MAJOR
  • added: variable OSS_MINOR
  • added: variable OSS_PATCH
  • added: variable OSS_SUFFIX
  • added: variable PATCH
  • added: variable SUFFIX
  • added: function from_current_time() -> Timestamp
  • added: function from_json_string(value: str) -> Timestamp
  • added: function from_microseconds(micros: float) -> Timestamp
  • added: function from_milliseconds(millis: float) -> Timestamp
  • added: function from_nanoseconds(nanos: float) -> Timestamp
  • added: function from_seconds(seconds: float) -> Timestamp
  • added: function to_datetime(ts: Timestamp, tz: Optional[datetime.tzinfo]=…) -> datetime.datetime
  • added: function to_json_string(ts: Timestamp) -> str
  • added: function to_microseconds(ts: Timestamp) -> int
  • added: function to_milliseconds(ts: Timestamp) -> int
  • added: function to_nanoseconds(ts: Timestamp) -> int
  • added: function to_seconds(ts: Timestamp) -> int