Changes announced on December 27, 2023

Changes announced for Protocol Buffers on December 27, 2023.

Ruby Breaking Changes

The following changes are planned for the 26.x line:

  • Fix RepeatedField#each_index to have the correct semantics. (#11767)
  • Remove Ruby DSL and associated compatibility code, which will complete the migration announced in April.
  • Message#to_h fixes:
    • Remove unset oneof fields. (#6167)
    • Remove unset sub-message fields
  • Use message’s pool for encode_json/decode_json.
  • Remove the deprecated syntax accessor, FileDescriptor.syntax and add semantic checks in its place:
    • FieldDescriptor.has_presence to test if a field has presence.
    • FieldDescriptor.is_packed to test if a repeated field is packed.
    • FieldDescriptor.requires_utf8_validation to test if a string field requires UTF-8 validation.
    • EnumDescriptor.is_closed to test if an enum is closed.

PHP Breaking Changes

The following changes are planned for the 26.x line:

  • Validate UTF-8 for string fields in setters.
  • Remove generic services. (commit 40ad3fa)

Python Breaking Changes

The following changes are planned for the 26.x line:

  • Make str(msg) escape any invalid UTF-8 in string fields.
  • Make text_format.MessageToString() default to outputting raw UTF-8, while escaping any invalid UTF-8 sequences.
  • Fix timestamp bounds (commit 1250d5f)

upb Breaking Changes

The following changes are planned for the 26.x line: