Commit d89f04a
committed
fix: replace deprecated FieldDescriptor.label with is_repeated
Replace all three uses of `field.label == FieldDescriptor.LABEL_REPEATED`
with `field.is_repeated` in proto_utils.py, as tracked in #1011.
The `FieldDescriptor.label` property was deprecated in protobuf 4.x.
Since the minimum protobuf requirement is already >=5.29.5 (where
`is_repeated` is available), this cleanup is safe to apply now.
Affected functions:
- `parse_params()` — REST query parameter parsing
- `_check_required_field_violation()` — required field validation
- `_recurse_validation()` — nested message recursion
Closes #10111 parent c0c6c08 commit d89f04a
1 file changed
Lines changed: 3 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 177 | + | |
181 | 178 | | |
182 | 179 | | |
183 | 180 | | |
| |||
211 | 208 | | |
212 | 209 | | |
213 | 210 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
| 211 | + | |
218 | 212 | | |
219 | 213 | | |
220 | 214 | | |
| |||
255 | 249 | | |
256 | 250 | | |
257 | 251 | | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
| 252 | + | |
262 | 253 | | |
263 | 254 | | |
264 | 255 | | |
| |||
0 commit comments