Skip to content

Releases: protocolbuffers/protobuf

Protocol Buffers v32.0-rc1

22 Jul 01:11
Compare
Choose a tag to compare
Pre-release

Announcements

  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.

Bazel

  • Generate .pyi files in py_proto_library (#10366) (#21567) (e3e56c7)
  • Introduce denylisted_protos as a preferred replacement for blacklisted_protos attribute. (795ab9d)
  • Use native.proto_library for Bazel 7 and explicitly error for Bazel 6 which is incompatible and out of support. (da0077e)
  • Require ProtoInfo provider instead of proto_library rule for bazel cc_proto_library deps. (639f1c9)

Compiler

  • Deprecate google.protobuf.Method.syntax and google.protobuf.Method.edition (9ec241e)
  • Enable edition 2024 support in protoc and language generators for cpp, hpb, java, kotlin, objectivec, php, python, pyi, rust. (26843b3)
  • Ban import weak and weak field option in edition 2024 in protoc (parser and c++ runtime). (a2a0511)

C++

  • Remove the flag requirement for Bazel+MSVC users. (c6ba697)
  • Enable edition 2024 support in protoc and language generators for cpp, hpb, java, kotlin, objectivec, php, python, pyi, rust. (26843b3)
  • Cast GetCachedTID() to unsigned to prevent left-shifting a negative number. (3e935cf)
  • Update comment at the top of message.h and message_lite.h to document that it should only be extended by gencode and not user code. (6a6ba52)
  • Treat warnings encountered in chromium builds as errors. (21c3c53)
  • Ban import weak and weak field option in edition 2024 in protoc (parser and c++ runtime). (a2a0511)

Java

  • Restore the long-deprecated static functions on TextFormat. (5777d3b)
  • Add Kotlin class name helpers to names.h (527b2ab)
  • Enable edition 2024 support in protoc and language generators for cpp, hpb, java, kotlin, objectivec, php, python, pyi, rust. (26843b3)
  • Update Java gencode base class documentation to clarify that it is not supported to extend them. (c3177fb)
  • Add a FieldMaskUtil#trim overload that accepts TrimOptions and allows retaining unset primitive field state. (84c5b63)

Csharp

  • Enable edition 2024 support in protoc and language generators for cpp, hpb, java, kotlin, objectivec, php, python, pyi, rust. (26843b3)
  • Include also ARM build of protoc in nuget package (#21568) (c2b4040)
  • Improve C# handling of Any JSON serialization/deserialization (dc4e429)

Objective-C

  • Enable edition 2024 support in protoc and language generators for cpp, hpb, java, kotlin, objectivec, php, python, pyi, rust. (26843b3)

Rust

  • Enable edition 2024 support in protoc and language generators for cpp, hpb, java, kotlin, objectivec, php, python, pyi, rust. (26843b3)
  • Update Rust generator to output minidescriptors instead of C minitables (1b4b5fc)
  • Add [clear_and_]parse_dont_enforce_required() to Rust protobuf. (e2fd7a0)
  • Add #[non_exhaustive] on the oneof-case enum (aba2075)
  • Impl Clone for RepeatedIter (aca1ed5)
  • See also UPB changes below, which may affect Rust.

Python

  • Add Python deprecation warnings for Descriptor Label. (64a76e6)
  • Updating setuptools to patch CVE-2025-47273 (#22094) (508aba1)
  • Enable edition 2024 support in protoc and language generators for cpp, hpb, java, kotlin, objectivec, php, python, pyi, rust. (26843b3)
  • Extend gencode compatibility support back to 3.20.0 (1af7fd4)
  • Change proto_api work with custom pool for upb and pure python. (49d9e2d)
  • Python pyi print "import datetime" for Duration/Timestamp field (f59b84a)
  • Add reference leak check to Python well_known_types_test. Fix two refleak bugs. (e5f9ab4)
  • Add reference leak check to Python timestamp_test and duration_test. Fix a refleak bug when assign datetime/duration to Timestamp/Duration (e004c8b)
  • Add recursion depth limits to pure python (17838be)
  • Remove calls to Label within Protobuf Python. (f69180a)
  • Change Python .pyi stubs to generated _Optional[] for bool fields same with (6972464)
  • Remove internal/api_implementation.Version() (cbad456)
  • Fix python proto_api to work with messages that required fields are not set. (f63ed55)
  • Fix python upb crashes on map/repeated reference stub destructor (4274909)
  • Mark Py JSON float_precision deprecated. (727a8ed)

PHP

  • Enable edition 2024 support in protoc and language generators for cpp, hpb, java, kotlin, objectivec, php, python, pyi, rust. (26843b3)
  • Fix(php): use count instead of ->count() to avoid bug in c-extension (9fbce62)
  • [php][compiler][ext] - Add missing has* methods and other well known types (#20636) (01a7429)
  • Fix PHP 8.4 deprecation in GPBDecodeException (#21232) (676666e)

PHP C-Extension

  • Change 'getLabel is deprecated' to E_USER_DEPRECATED (158d8ac)
  • [php][compiler][ext] - Add missing has* methods and other well known types (#20636) (01a7429)
  • See also UPB changes below, which may affect PHP C-Extension.

Ruby

  • Enable edition 2024 support in protoc and language generators for cpp, hpb, java, kotlin, objectivec, php, python, pyi, rust. (26843b3)
  • Fix silent failure of rb_test rules to run test (#21733) (4f74764)

Ruby C-Extension

  • Removed wrap_memcpy.c compatibility shim for pre-2.14 glibc (4ba9733)
  • See also UPB changes below, which may affect Ruby C-Extension.

UPB (Python/PHP/Ruby C-Extension)

  • Add upb_Message_SetExtensionMessage as a helper for setting a extension field that is a message. This is the extension equivalent of upb_Message_SetBaseFieldMessage. (f15d28a)

Other

Read more

Protocol Buffers v31.1

28 May 18:57
Compare
Choose a tag to compare

Announcements

  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.

Compiler

  • Support allowing late injection of language feature set defaults from FeatureSet extensions while getting feature set extension values. (3419598)

C++

  • Support allowing late injection of language feature set defaults from FeatureSet extensions while getting feature set extension values. (3419598)

Java

  • Add missing copts attribute (#21982) (bec5b5a)
  • Support allowing late injection of language feature set defaults from FeatureSet extensions while getting feature set extension values. (3419598)

Python

  • Support allowing late injection of language feature set defaults from FeatureSet extensions while getting feature set extension values. (3419598)
  • Python pyi print "import datetime" for Duration/Timestamp field (#21885) (0fe099a)
  • Add recursion depth limits to pure python (a3921fb)

Other

  • Fix cmake staleness test (96a9ef6)

Protocol Buffers v29.5

28 May 21:39
Compare
Choose a tag to compare

Announcements

  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.

C++

  • Remove fast-path check for non-clang compilers in MessageCreator. (#21612) (69cca9b)

Java

Python

Other

Protocol Buffers v25.8

27 May 21:49
Compare
Choose a tag to compare

Announcements

  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.

Java

  • Change pre-22 poison pill to only log once per affected message type. (#21754) (88a3b90)
  • Weaken vulnerable gencode poison pill to a warning by default. (320eafa)

Python

  • Backport recursion limit enforcement to 25.x (29445be)

Protocol Buffers v31.0

14 May 17:32
Compare
Choose a tag to compare

Announcements

  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.

Bazel

  • Loosen py_proto_library check to be on the import path instead of full directory (i.e. excluding external/module-name prefix). (a4be867)

Compiler

  • Add support for import option for protoc.(9901db6)
  • Add notices.h with information about our dependencies' licenses and add --notices flag to protoc to print the contents of that file. (7a26486)
  • Move upb minitable code generator into protoc (dce6b0f)
  • Upgrade abseil-cpp to 20250127 and use @com_google_absl -> @abseil-cpp and com_google_googletest -> @googletest canonical BCR names. (ba6b54d)

C++

  • Remove fast-path check for non-clang compilers in MessageCreator. (aa5410d)
  • Add missing include. (d390631)
  • Add weak attribute to GetClassData to speed up clang builds. (d896480)
  • Add nontemporal software prefetcher to repeated ptr field dtor to improve performance. (73f3469)
  • Warn on unused RepeatedPtrField. (683e9d2)
  • Add notices.h with information about our dependencies' licenses and add --notices flag to protoc to print the contents of that file. (7a26486)
  • Fix a bug in handling of implicit-presence string_view fields. (bd70a7c)
  • Control bounds checks via BUILD flags. (d21e8ef)
  • Upgrade abseil-cpp to 20250127 and use @com_google_absl -> @abseil-cpp and com_google_googletest -> @googletest canonical BCR names. (ba6b54d)
  • Create hardened versions of Get and Mutable for repeated_field. (ffade4a)

Java

  • Add weak attribute to GetClassData to speed up clang builds. (d896480)
  • Use ProtobufToStringOutput to control the output format of AbstractMessage.Builder.toString. (f5cb162)
  • Implement Protobuf Java Immutable API nest_in_file_class feature for Edition 2024. (0416c3e)
  • Introduce a Generated annotation to eventually replace javax.annotation.Generated (31e57fc)
  • Add volatile to featuresResolved (9e03ca5)
  • Fix Java concurrency issue in feature resolution for old <=3.25.x gencode using lazy feature resolution. (fafb0fd)
  • Remove Java runtime classes from kotlin release. (079be27)
  • Split maven dependencies into dev vs local (#20549) (e045fc6)
  • Improve error messaging when detecting and erroring out on integer overflow of byte count limit variables. (097fdb8)

Kotlin

  • Remove Java runtime classes from kotlin release. (079be27)

Csharp

  • Remove "experimental API" warnings from members in the .NET protobuf runtime. (afea52f)
  • Improve performace of repeated packed fixedSize fields (#19667) (85507b9)

Objective-C

  • [ObjC] Deprecate GPBFieldDescriptor.isOptional. (86ab252)
  • [ObjC] Raise the library version and enable new generated code. (a639cf8)

Rust

  • Cherry-pick Rust fix to 31.x (#21617) (01b42bb)
  • Add upb_Map_GetMutable API to upb (dd5bf5e)
  • See also UPB changes below, which may affect Rust.

Python

  • Update GetCurrentTime to use datetime.datetime.now (01b154c)
  • Make Py JSON float_precision apply to both float and double fields. (5b54ee3)
  • -Add '+' and '-' annotations for Timestamp and Duration in Python (fff783e)
  • Bug fix for FieldMask.MergeFrom() with unset fields. (1c87ac3)
  • Make python text_format able to skip unknown fields for repeated messages (dcafca2)
  • Fix segment fault for UPB Pyhon 'in' method of empty repeated extensions (da04261)
  • Fix upb to escape DefinitelyNeedsEscape (like " and ') for bytes field (b234305)
  • Check with fallback descriptorDB for FindExtensionByNumber()/FindAllExtensions in UPB python pool. (9fd28d9)
  • Add clear() method to repeated fields in Python. (0324f39)
  • Register Scalar/MessageMapContainerTypes as virtual subclasses of (9a0b591)
  • Fix python codegen crash when C++ features are used. (308aaf4)
  • Add more detail to the comment for GetMessageClassesForFiles (9befb58)
  • Add constructing unpack routine to Python Protobuf Any API. (fb78c09)
  • Implement typing for proto Timestamp/Duration assignments. (0e3326b)

PHP

  • Deprecate Descriptor Label. As an alternative, add helper methods for checking whether a field is required or repeated. (d82de8f)
  • Feat(php): improve return typehint when repeatedfield (#11734) (e04fe69)

PHP C-Extension

  • Automated rollback of commit f9863df. (#21355) (a59988c)
  • Deprecate Descriptor Label. As an alternative, add helper methods for checking whether a field is required or repeated. (d82de8f)
  • Ruby: Allow to get a file descriptor by a file name (#20287) (c398592)
  • Feat(php): improve return typehint when repeatedfield (#11734) (e04fe69)
  • See also UPB changes below, which may affect PHP C-Extension.

Ruby

  • Fix silent failure of rb_test rules to run test (#21733) (0cf5489)
  • Ruby | Add support for a protobuf debug build (#21060) (59e1f0f)
  • Ruby | Support installing the gem via git and some other small build tweaks (#21061) (d3560e7)
  • Deprecate Descriptor Label. As an alternative, add helper methods for checking whether a field is required or repeated. (d82de8f)
  • [Ruby]Implement #to_hash for message classes (#20866) (5596f6d)
  • Drop Ruby 3.0 (5de7c80)
  • Fixes #18726 ...
Read more

Protocol Buffers v31.0-rc2

30 Apr 18:12
Compare
Choose a tag to compare
Pre-release

Announcements

  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.

Compiler

  • Add support for import option for protoc.(9901db6)

PHP

PHP C-Extension

Other

Protocol Buffers v25.7

23 Apr 23:02
Compare
Choose a tag to compare

Announcements

  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.

Compiler

C++

PHP

  • Fix(php): do not throw deprecated warning on field getters for default values (#21033) (a4dc75f)

Ruby

Other

  • Update test_cpp.yml (96fca23)
  • Backport bumps to aarch64 runners (d4a4426)

Protocol Buffers v31.0-rc1

18 Apr 16:16
Compare
Choose a tag to compare
Pre-release

Announcements

  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.

Bazel

  • Loosen py_proto_library check to be on the import path instead of full directory (i.e. excluding external/module-name prefix). (a4be867)

Compiler

  • Implement Protobuf Java Immutable API nest_in_file_class feature for Edition 2024. (0416c3e)
  • Fix python codegen crash when C++ features are used. (308aaf4)
  • Add notices.h with information about our dependencies' licenses and add --notices flag to protoc to print the contents of that file. (7a26486)
  • Move upb minitable code generator into protoc (dce6b0f)
  • Upgrade abseil-cpp to 20250127 and use @com_google_absl -> @abseil-cpp and com_google_googletest -> @googletest canonical BCR names. (ba6b54d)

C++

  • Add weak attribute to GetClassData to speed up clang builds. (d896480)
  • Implement Protobuf Java Immutable API nest_in_file_class feature for Edition 2024. (0416c3e)
  • Add nontemporal software prefetcher to repeated ptr field dtor to improve performance. (73f3469)
  • Warn on unused RepeatedPtrField. (683e9d2)
  • Fix python codegen crash when C++ features are used. (308aaf4)
  • Add notices.h with information about our dependencies' licenses and add --notices flag to protoc to print the contents of that file. (7a26486)
  • Fix a bug in handling of implicit-presence string_view fields. (bd70a7c)
  • Move upb minitable code generator into protoc (dce6b0f)
  • Control bounds checks via BUILD flags. (d21e8ef)
  • Upgrade abseil-cpp to 20250127 and use @com_google_absl -> @abseil-cpp and com_google_googletest -> @googletest canonical BCR names. (ba6b54d)
  • Create hardened versions of Get and Mutable for repeated_field. (ffade4a)

Java

  • Add weak attribute to GetClassData to speed up clang builds. (d896480)
  • Use ProtobufToStringOutput to control the output format of AbstractMessage.Builder.toString. (f5cb162)
  • Implement Protobuf Java Immutable API nest_in_file_class feature for Edition 2024. (0416c3e)
  • Introduce a Generated annotation to eventually replace javax.annotation.Generated (31e57fc)
  • Introduce Java NestInFileClass feature in java_features.proto for Edition 2024. (c8ff762)
  • Add volatile to featuresResolved (9e03ca5)
  • Fix Java concurrency issue in feature resolution for old <=3.25.x gencode using lazy feature resolution. (fafb0fd)
  • Automated rollback of commit 1d4b6ba. (1df3dde)
  • Remove Java runtime classes from kotlin release. (079be27)
  • Split maven dependencies into dev vs local (#20549) (e045fc6)
  • Automated rollback of commit 6d2f6fc. (055297b)
  • Improve error messaging when detecting and erroring out on integer overflow of byte count limit variables. (097fdb8)
  • Upgrade abseil-cpp to 20250127 and use @com_google_absl -> @abseil-cpp and com_google_googletest -> @googletest canonical BCR names. (ba6b54d)

Kotlin

  • Remove Java runtime classes from kotlin release. (079be27)

Csharp

  • Remove "experimental API" warnings from members in the .NET protobuf runtime. (afea52f)
  • Improve performace of repeated packed fixedSize fields (#19667) (85507b9)
  • Upgrade abseil-cpp to 20250127 and use @com_google_absl -> @abseil-cpp and com_google_googletest -> @googletest canonical BCR names. (ba6b54d)

Objective-C

  • [ObjC] Deprecate GPBFieldDescriptor.isOptional. (86ab252)
  • [ObjC] Raise the library version and enable new generated code. (a639cf8)
  • Upgrade abseil-cpp to 20250127 and use @com_google_absl -> @abseil-cpp and com_google_googletest -> @googletest canonical BCR names. (ba6b54d)

Rust

  • Add upb_Map_GetMutable API to upb (dd5bf5e)
  • Upgrade abseil-cpp to 20250127 and use @com_google_absl -> @abseil-cpp and com_google_googletest -> @googletest canonical BCR names. (ba6b54d)
  • See also UPB changes below, which may affect Rust.

Python

  • Update GetCurrentTime to use datetime.datetime.now (01b154c)
  • Make Py JSON float_precision apply to both float and double fields. (5b54ee3)
  • -Add '+' and '-' annotations for Timestamp and Duration in Python (fff783e)
  • Bug fix for FieldMask.MergeFrom() with unset fields. (1c87ac3)
  • Make python text_format able to skip unknown fields for repeated messages (dcafca2)
  • Fix segment fault for UPB Pyhon 'in' method of empty repeated extensions (da04261)
  • Fix upb to escape DefinitelyNeedsEscape (like " and ') for bytes field (b234305)
  • Check with fallback descriptorDB for FindExtensionByNumber()/FindAllExtensions in UPB python pool. (9fd28d9)
  • Add clear() method to repeated fields in Python. (0324f39)
  • Register Scalar/MessageMapContainerTypes as virtual subclasses of (9a0b591)
  • Fix python codegen crash when C++ features are used. (308aaf4)
  • Add more detail to the comment for GetMessageClassesForFiles (9befb58)
  • Add constructing unpack routine to Python Protobuf Any API. (fb78c09)
  • Implement typing for proto Timestamp/Duration assignments. (0e3326b)
  • Upgrade abseil-cpp to 20250127 and use @com_google_absl -> @abseil-cpp and com_google_googletest -> @googletest canonical BCR names. (ba6b54d)

PHP

  • Deprecate Descriptor Label. As an alternative, add helper methods for checking whether a field is required or repeated. (d82de8f)
  • Feat(php): improve return typehint when ...
Read more

Protocol Buffers v30.2

26 Mar 18:45
Compare
Choose a tag to compare

Announcements

  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.

Compiler

  • Restore generator headers in cmake install until the next breaking C++ release (#20749) (b69f653)

C++

  • Remove dllexport attribute on variable definition. (#20833) (7831669)
  • Restore generator headers in cmake install until the next breaking C++ release (#20749) (b69f653)
  • Change how we decide which empty string implementation to use. (#20708) (221b2a0)

Java

  • Remove dllexport attribute on variable definition. (#20833) (7831669)
  • Add protobuf_maven artifacts to protobuf_maven_dev as well so they can still be referenced correctly using the dev namespace for dev-only targets. (#20771) (09b5078)
  • Add volatile to featuresResolved (#20766) (b7f06f1)
  • Restore generator headers in cmake install until the next breaking C++ release (#20749) (b69f653)
  • Restore custom protobuf maven namespaces to avoid polluting main maven namespace for non-dev dependencies as well. (#20739) (f4b0a79)
  • Fix Java concurrency issue in feature resolution for old <=3.25.x gencode using lazy feature resolution. (#20751) (2dc9f35)
  • Fix lite classes in the protobuf-java Maven release to be JDK8 compatible. (#20843) (7a4c63b)

Kotlin

  • Restore custom protobuf maven namespaces to avoid polluting main maven namespace for non-dev dependencies as well. (#20739) (f4b0a79)

Csharp

  • Restore generator headers in cmake install until the next breaking C++ release (#20749) (b69f653)

Objective-C

  • Restore generator headers in cmake install until the next breaking C++ release (#20749) (b69f653)

Python

  • Restore generator headers in cmake install until the next breaking C++ release (#20749) (b69f653)

Ruby

  • Restore generator headers in cmake install until the next breaking C++ release (#20749) (b69f653)

Other

  • Restore JDK8 compatibility in Bazel for libraries with dependencies from Maven (e.g. //java/util) (#20832) (da9cadc)

Protocol Buffers v29.4

19 Mar 21:36
Compare
Choose a tag to compare

Announcements

  • Protobuf News may include additional announcements or pre-announcements for upcoming changes.

Java

  • Fix Java concurrency issue in feature resolution for old <=3.25.x gencode using lazy feature resolution. (#20750) (ce59907)