Announcements
- This version includes breaking changes to: C++, Objective-C, Python, Rust.
- [C++] Remove deprecated JsonOptions alias. (e2eb0a1)
- [C++] Remove CMake submodule support in favor of fetched or installed dependencies. (3f06ca4)
- [C++] Prohibit using Bazel+MSVC to build protobuf (117e7bb)
- [C++] Remove deprecated Arena::CreateMessage. (d83a536)
- [C++] Upgrade return type of
type_name()
andcpp_type_name()
fromconst char*
toabsl::string_view
. (a9ad51f) - [C++] Strip ctype from options in C++ (aebf8b9)
- [C++] Remove
MutableRepeatedFieldRef::Reserve()
in reflection (913f7b0) - [C++] Upgrade return type of several string returning functions to
absl::string_view
. (d1990d9) - [C++] Flip default behavior for handling cmake dependencies. (9cc685e)
- [C++] Add ASAN poisoning after clearing oneof messages on arena. (54d068e)
- [C++] Remove deprecated RepeatedPtrField::ClearedCount(). (e8e3253)
- [C++] Remove deprecated Arena::GetArena. (30ed452)
- [Objective-C] [ObjC] Remove legacy WKT headers. (d9caebc)
- [Objective-C] Upgrade return type of several string returning functions to
absl::string_view
. (d1990d9) - [Python] Remove deprecated reflection methods (292f964)
- [Python] Remove deprecated GetPrototype MessageFactory.GetPrototype(), (c261b49)
- [Python] Remove deprecated Python RPC Service Interfaces (5ba74b1)
- [Python] Remove deprecated GetDebugString() from protobuf python cpp extension. (721a452)
- [Python] Upgrade return type of several string returning functions to
absl::string_view
. (d1990d9) - [Python] Fix closed enum validation under editions (72b3eda)
- [Python] Python setdefault behavior change for map field. (81da6b9)
- [Python] Python nested message class qualname now contains the outer message name. (Previous qualname has the same result with name for nested message that outer message name was not included) (0720536)
- Protobuf News may include additional announcements or pre-announcements for upcoming changes.
Bazel
- Remove reference to cc_proto_aspect (fa02f76)
- Remove deprecated bazel/system_python.bzl alias. (00f108c)
Compiler
- Have the protoc CLI properly report any parser warnings. (cafeaa4)
- Split protoc apart from libprotoc in our cmake configs. (b4b93b3)
- Begin adding extension numbers to SourceCodeInfo and FileDescriptorSet for tooling purposes. (9d7236b)
- Fix various unsigned to signed comparison warnings. (#17212) (67de087)
C++
- Make DebugString print debug output, enable debug markers for debug output (9a03332)
- Fix missing port_undef (#20052) (0644388)
- Use __builtin_expect_with_probability for proto field presence checks. (e958419)
- Enable meta-tagging for redaction purposes (1f48795)
- Breaking change: Prohibit using Bazel+MSVC to build protobuf (117e7bb)
- Breaking change: Upgrade return type of several string returning functions to
absl::string_view
. (d1990d9) - Print the presence probability when analysis is enabled. (d4ba7ff)
- Split protoc apart from libprotoc in our cmake configs. (b4b93b3)
- Breaking change: Strip ctype from options in C++ (aebf8b9)
- Breaking change: Remove
MutableRepeatedFieldRef::Reserve()
in reflection (913f7b0) - Remove stale references to C++14. (f4cc92c)
- Breaking change: Upgrade return type of
type_name()
andcpp_type_name()
fromconst char*
toabsl::string_view
. (a9ad51f) - Update cmake minimum version to >=3.16. (21f535c)
- Migrate coded output stream arguments from
const std::string&
toabsl::string_view
. (0361a59) - Breaking change: Remove deprecated Arena::GetArena. (30ed452)
- Remove the time (or time-based) entropy being added to Map's seed. (a7875bb)
- Don't use CLOCK_UPTIME_RAW if it won't be defined (#16951) (097dcda)
- Fix DEPENDENCIES in protobuf_generate() to accept multiple values instead of silently dropping (52887e1)
- Use ABSL_PREDICT_TRUE|FALSE instead of PROTOBUF_PREDICT_TRUE|FALSE. (fd47730)
- Breaking change: Flip default behavior for handling cmake dependencies. (9cc685e)
- Use [[maybe_unused]] instead of PROTOBUF_UNUSED. (a7dd155)
- Use [[nodiscard]] instead of PROTOBUF_NODISCARD (1ceedf8)
- Breaking change: Remove deprecated JsonOptions alias. (e2eb0a1)
- Generate internal hasbits for singular proto3 implicit presence fields. (3e82ed4)
- Add name mangling to nested names that collide with known generated names, like (f2cf85c)
- Breaking change: Remove deprecated RepeatedPtrField::ClearedCount(). (e8e3253)
- Breaking change: Add ASAN poisoning after clearing oneof messages on arena. (54d068e)
- Breaking change: Remove deprecated Arena::CreateMessage. (d83a536)
- Change DynamicCastMessage to throw a
std::bad_cast
exception when exceptions (33bbbeb) - Fixed a missing check in wire format verification. (2ac862f)
- Comment change: clarifies that the field/value order is based on textual order in the file, not the order of the enums. (f92335b)
- Bump minimum C++ version to C++17 after branch cut for v29. (fe53593)
- Bump abseil dependency version from 20230802.1 to 20240722.0. (c75095b)
- Breaking change: Remove CMake submodule support in favor of fetched or installed dependencies. (3f06ca4)
- Support fetching CMake dependencies via
-Dprotobuf_FETCH_DEPENDENCIES=ON
(d3735bc) - Avoid field id comparisons in ExtensionSet serialization in case of single range. (8f6a7a2)
- Let ArenaStringPtr debug-fail if it ever attempts to clear a default string. (6c9c12c)
- Fix various unsigned to signed comparison warnings. (#17212) (67de087)
Java
- Refactor TextFormat.Printer.MapEntryAdapter to handle more entry types. This will properly sort map keys for DynamicMessage maps. (84769d3)
- Re-Expose UnderscoresToCapitalizedCamelCase for plugins in OSS. (94ae26d)
- Upgrade return type of several string returning functions to
absl::string_view
. (d1990d9) - Fix mishandling of open enum + explicit presence fields. (0ccd845)
- Disable useShortRepeatedPrimitives for Printer.DEFAULT_DEBUG_FORMAT (1900cbe)
- Optimize Java gencode version validation (59a8de6)
- Make Java consistently reject unmatched end-group tag. (a4d4bfe)
- Make Java-lite reject unmatched end-group tag. (84e81cf)
- Fix handling of implicit field presence in mergeFrom to match the behavior in other places. (3e0f82e)
- Use ABSL_PREDICT_TRUE|FALSE instead of PROTOBUF_PREDICT_TRUE|FALSE. (fd47730)
- Use [[maybe_unused]] instead of PROTOBUF_UNUSED. (a7dd155)
- Remove deprecation warnings for Timestamp and Duration add/subtract/between that we do not yet have alternatives to. (f6cddd2)
- Add support to print repeated fields with primitive values using short notation (b8d3567)
- Fix unexpected NumberFormatException in Durations.parse() by replacing with documented thrown ParseException. (ee5aa49)
- Give Kotlin jars an OSGi Manifest (#18812) (27ddb9c)
- Lite: Remove intermediary dynamicMethod function trampolines (25724ab)
- Speed up SingleFieldBuilder.getBuilder() by avoiding reloading this.builder at return. (f7b0faf)
- Restore runtime compatibility with 3.22.x gencode by re-adding the mutableCopy(list) methods. (6628b8a)
- CodedOutputStream: Avoid updating position to go beyond end of array. (24160d5)
- Fix various unsigned to signed comparison warnings. (#17212) (67de087)
- Throw more informative OutOfSpaceExceptions when we run out of space serializing a proto. (bc24489)
Kotlin
Csharp
- Breaking change: Upgrade return type of several string returning functions to
absl::string_view
. (d1990d9) - Support tuples when parsing JSON dicts (75bb72e)
- Don't use CLOCK_UPTIME_RAW if it won't be defined (#16951) (097dcda)
- Breaking change: Python nested message class qualname now contains the outer message name. (Previous qualname has the same result with name for nested message that outer message name was not included) (0720536)
- Fix a Python bug: when package is empty, DescriptorDatabase FindFileContainingSymbol method will able to find symbol names not start with '.' (610702e)
- Throw InvalidProtocolBufferException when parsing invalid UTF-8 in C#. (db9b2c8)
- Use ABSL_PREDICT_TRUE|FALSE instead of PROTOBUF_PREDICT_TRUE|FALSE. (fd47730)
- Breaking change: Flip default behavior for handling cmake dependencies. (9cc685e)
- Use [[maybe_unused]] instead of PROTOBUF_UNUSED. (a7dd155)
- Breaking change: Remove deprecated GetPrototype MessageFactory.GetPrototype(), (c261b49)
Objective-C
- Generate Kythe annotations for objc messages. (8868171)
- Breaking change: Upgrade return type of several string returning functions to
absl::string_view
. (d1990d9) - Update minimum supported macOS 11 (9f1b38e)
- Breaking change: [ObjC] Remove legacy WKT headers. (d9caebc)
- [ObjC] Breaking Change: Remove deprecated apis. (2a52b90)
- [ObjC] Breaking Change: Remove support for older generated code. (cffa590)
- [ObjC] Breaking Change: Remove GPBUnknownFieldSet. (2b93422)
Python
- Fix missing port_undef (#20052) (0644388)
- Python protobuf: kwargs initialization now allows dict() for proto map values. (6235687)
- Python: Improve refleak checker for Python 3.12. (336d6f0)
- Rename bazel "pip_deps" hub_name. (32838e8)
- Breaking change: Upgrade return type of several string returning functions to
absl::string_view
. (d1990d9) - Add has_options to ServiceDescriptor and MethodDescriptor in UPB python and cpp python to match with other descriptors and pure python (4214ee7)
- Nextgen Proto Pythonic API: Add byte_size(), clear_message() and clear_field() APIs in proto module (975bb07)
- Nextgen Proto Pythonic API: “Add-on” proto for Text Format serialize/parse (e9fa879)
- Fix bug that DiscardUnknownFields did not discard unknown fields of extensions in Py-upb and Php-upb and ruby-upb. (98aab04)
- Remove the entire pb_unit_tests/ directory with reflection_test_wrapper. (39808bc)
- Performance optimization for upb python extend repeated scalars. (6c3ff5a)
- Ensure protobuf Message.dir returns proto fields (1803f8b)
- Breaking change: Fix closed enum validation under editions (72b3eda)
- Make python text-format reject octal floats (8f2ad12)
- Treat -0.0 as consistently distinct from 0.0 in pure python (bc16fe8)
- Remove decoder.SkipField. (1b0b1c9)
- Make Pure Python reject unmatched end-group tag in unknown fields (f69ea1c)
- Make Python/C++ reject unmatched end-group tag. (482752a)
- Override protobuf Message.dir method (9668016)
- Add "absl::StatusOr GetConstMessagePointer(PyObject* msg)" in proto_api which works with cpp extension, upb and pure python. (b9e69e8)
- Fix a python bug that UPB and Python C++ extension assume MessageSet extensions are ordered first (3781f45)
- Drop Python 3.8 support (f5a2937)
- Fix a python bug for text_format pretty print when Struct in Any (d3e9897)
- Support tuples when parsing JSON dicts (75bb72e)
- Breaking change: Python nested message class qualname now contains the outer message name. (Previous qualname has the same result with name for nested message that outer message name was not included) (0720536)
- Breaking change: Python setdefault behavior change for map field. (81da6b9)
- Fix a Python bug: when package is empty, DescriptorDatabase FindFileContainingSymbol method will able to find symbol names not start with '.' (610702e)
- Use ABSL_PREDICT_TRUE|FALSE instead of PROTOBUF_PREDICT_TRUE|FALSE. (fd47730)
- Breaking change: Remove deprecated GetPrototype MessageFactory.GetPrototype(), (c261b49)
- Breaking change: Remove deprecated GetDebugString() from protobuf python cpp extension. (721a452)
- Add Python 3.13 test coverage (7060d3d)
- Fix a python bug when assign an empty Struct at creation. (47613cf)
- Add "PythonMessageMutator GetClearedMutableMessage(PyObject *);" in proto_api which works with cpp extension, upb and pure python. (5706140)
- Breaking change: Remove deprecated reflection methods (292f964)
- Breaking change: Remove deprecated Python RPC Service Interfaces (5ba74b1)
- Fix pyi generation for messages with a field named "self" (fa858b8)
PHP
- Handle optional fields correctly in Message_get method (#18982) (f1aa92a)
- Delete long-deprecated internal descriptor.proto gencode forwards. (cf9b774)
- Restore runtime compatibility with 3.22.x gencode by re-adding the mutableCopy(list) methods. (6628b8a)
PHP C-Extension
- Add
to_proto
to descriptor classes (#19971) (74122eb) - Fix bug that DiscardUnknownFields did not discard unknown fields of extensions in Py-upb and Php-upb and ruby-upb. (98aab04)
- Raise ParseError for non-numeric strings in numeric fields in Ruby and PHP JSON parsing. (abb197c)
- Handle optional fields correctly in Message_get method (#18982) (f1aa92a)
- Restore runtime compatibility with 3.22.x gencode by re-adding the mutableCopy(list) methods. (6628b8a)
- See also UPB changes below, which may affect PHP C-Extension.
Ruby
- Add
to_proto
to descriptor classes (#19971) (74122eb) - Support ruby 3.4 (#19752) (4a92a1c)
- Breaking change: Upgrade return type of several string returning functions to
absl::string_view
. (d1990d9) - Add a multi-platform Gemfile.lock (#19804) (56f318d)
- Fix ruby
has_...?
method (#19731) (4031c19) - Raise ParseError for non-numeric strings in numeric fields in Ruby and PHP JSON parsing. (abb197c)
- Error if assigning a "UTF-8" string with invalid UTF-8. (2f505a7)
- Third_party/utf8_range: support arm neon (#18126) (d83ad15)
Ruby C-Extension
- Add
to_proto
to descriptor classes (#19971) (74122eb) - Ruby: make it possible to specify compiler for C extension (#19863) (b46f315)
- Fix bug that DiscardUnknownFields did not discard unknown fields of extensions in Py-upb and Php-upb and ruby-upb. (98aab04)
- Fix ruby
has_...?
method (#19731) (4031c19) - Raise ParseError for non-numeric strings in numeric fields in Ruby and PHP JSON parsing. (abb197c)
- Error if assigning a "UTF-8" string with invalid UTF-8. (2f505a7)
- Update minimum supported macOS 11 (9f1b38e)
- See also UPB changes below, which may affect Ruby C-Extension.
UPB (Python/PHP/Ruby C-Extension)
- Add
to_proto
to descriptor classes (#19971) (74122eb) - Randomize upb's map ordering (066531d)
- Fix bug that DiscardUnknownFields did not discard unknown fields of extensions in Py-upb and Php-upb and ruby-upb. (98aab04)
- Add three conformance test edge cases for ProtoJSON repr of Any (b985164)
- Breaking change: Fix closed enum validation under editions (72b3eda)
- Raise ParseError for non-numeric strings in numeric fields in Ruby and PHP JSON parsing. (abb197c)
- Fix issue where a tmp buffer could have been too small when handling a serialized FeatureSet. (eb8a34d)
- Fixed comparison of empty repeated/map extensions. (a79fbc9)
- Fix a python bug that UPB and Python C++ extension assume MessageSet extensions are ordered first (3781f45)
- Support fetching CMake dependencies via
-Dprotobuf_FETCH_DEPENDENCIES=ON
(d3735bc)
Other
- Move to bazel 7 and turn down support for bazel 6. (afe2de2)
- Remove Protobuf-C++.podspec release. (b204518)
- Breaking change: Remove deprecated py_proto_library macro. (1e8e356)
- Upgrade minimum version of macOS support to macOS 10.15 (Catalina). (67fca5c)
- Breaking change: Update major version numbers for C++ and Python. (4997f3d)
- Update protoc release to include editions language features proto for Go (353d726)
- [ObjC] Breaking Change: Raise the major version for next release. (213bb61)
- Bump
rules_rust
to 0.51 to fix #18546 (9dad0b9)