Skip to content

Commit 8e56381

Browse files
Protocol Buffer TeamLogofile
authored andcommitted
This update does the following:
* Adds a new News article for upcoming breaking changes in Ruby, PHP, Python, and upb * Removse a paragraph about `FirstActiveYear` struct fields in the Go Generated Code Guide PiperOrigin-RevId: 594267305 Change-Id: I98b7ecd1985998644becb7aa810792818812539c
1 parent f04cadb commit 8e56381

File tree

4 files changed

+57
-5
lines changed

4 files changed

+57
-5
lines changed

content/news/2023-12-13.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type = "docs"
1010

1111
In v26, we are planning a major version bump for C++ as per our
1212
[breaking changes policy](/news/2022-07-06) and
13-
[version support policy](/support/version-support#python-support).
13+
[version support policy](/support/version-support#cpp-tooling).
1414

1515
The following sections outline the set of breaking changes that we plan to
1616
include in the 26.0 release of protocol buffers. Note that plans can and do

content/news/2023-12-27.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
+++
2+
title = "Changes announced on December 27, 2023"
3+
linkTitle = "December 27, 2023"
4+
toc_hide = "true"
5+
description = "Changes announced for Protocol Buffers on December 27, 2023."
6+
type = "docs"
7+
+++
8+
9+
## Ruby Breaking Changes
10+
11+
The following changes are planned for the 26.x line:
12+
13+
* Fix `RepeatedField#each_index` to have the correct semantics.
14+
([#11767](https://github.com/protocolbuffers/protobuf/pull/11767))
15+
* Remove Ruby DSL and associated compatibility code, which will complete the
16+
[migration announced in April](/news/2023-04-20).
17+
* `Message#to_h` fixes:
18+
* Remove unset oneof fields.
19+
([#6167](https://github.com/protocolbuffers/protobuf/issues/6167))
20+
* Remove unset sub-message fields
21+
* Use message's pool for
22+
[`encode_json`](https://github.com/protocolbuffers/protobuf/blob/2fb0b93d9de226ea96f2dc2b4779eb4712d01d5c/ruby/ext/google/protobuf_c/message.c#L1118)/[`decode_json`](https://github.com/protocolbuffers/protobuf/blob/2fb0b93d9de226ea96f2dc2b4779eb4712d01d5c/ruby/ext/google/protobuf_c/message.c#L1004).
23+
* Remove the deprecated syntax accessor, `FileDescriptor.syntax` and add
24+
semantic checks in its place:
25+
* `FieldDescriptor.has_presence` to test if a field has presence.
26+
* `FieldDescriptor.is_packed` to test if a repeated field is packed.
27+
* `FieldDescriptor.requires_utf8_validation` to test if a string field
28+
requires UTF-8 validation.
29+
* `EnumDescriptor.is_closed` to test if an enum is closed.
30+
31+
## PHP Breaking Changes
32+
33+
The following changes are planned for the 26.x line:
34+
35+
* Validate UTF-8 for string fields in setters.
36+
* Remove generic services.
37+
([commit 40ad3fa](https://github.com/protocolbuffers/protobuf/commit/40ad3fac603ba3c96e52a1266cd785a7adb8e3e4))
38+
39+
## Python Breaking Changes
40+
41+
The following changes are planned for the 26.x line:
42+
43+
* Make `str(msg)` escape any invalid UTF-8 in string fields.
44+
* Make `text_format.MessageToString()` default to outputting raw UTF-8, while
45+
escaping any invalid UTF-8 sequences.
46+
* Fix timestamp bounds ([commit 1250d5f](https://github.com/protocolbuffers/protobuf/commit/1250d5f6cccb0a45f959c7219980a0aad5060ee5))
47+
48+
## upb Breaking Changes
49+
50+
The following changes are planned for the 26.x line:
51+
52+
* Fix
53+
[nonconformance in JSON parsing](https://github.com/protocolbuffers/protobuf/blob/2f7b2832b6a62fec88efacbb97bf0a91b6a3670e/upb/conformance/conformance_upb_failures.txt)
54+
when `IgnoreUnknownEnumString` is enabled.

content/news/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ no_list = "true"
99
News topics provide information about past events and changes with Protocol
1010
Buffers, and plans for upcoming changes.
1111

12+
* [December 27, 2023](/news/2023-12-27) - Breaking
13+
changes in the 26.x line for Ruby, PHP, Python, and upb
1214
* [December 13, 2023](/news/2023-12-13) - Breaking
1315
Python and C++ changes in the 26.x line
1416
* [December 5, 2023](/news/2023-12-05) - Breaking Java

content/reference/go/go-generated.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,6 @@ an accessor method `GetBirthYear()` which returns the `int32` value in
216216
[zero value](https://golang.org/ref/spec#The_zero_value) of that type
217217
if the field is unset (`0` for numbers, the empty string for strings).
218218

219-
The `FirstActiveYear` struct field will be of type `*int32`, and additionally
220-
have the `HasFirstActiveYear()` and `ClearFirstActiveYear()` accessors, because
221-
it is marked `optional`.
222-
223219
For other scalar field types (including `bool`, `bytes`, and `string`), `int32`
224220
is replaced with the corresponding Go type according to the
225221
[scalar value types table](/programming-guides/proto3#scalar).

0 commit comments

Comments
 (0)