You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Task]: Replace deprecated FieldDescriptor.label with is_repeated in proto_utils #1011
src/a2a/utils/proto_utils.py currently uses the deprecated FieldDescriptor.label property to check whether a protobuf field is repeated. The non-deprecated alternative is FieldDescriptor.is_repeated, but adopting it requires a newer minimum version of protobuf than we currently declare, which would be a breaking change for downstream consumers.
Locations
All occurrences are in src/a2a/utils/proto_utils.py:
Planning to open a PR for backward-compatible repeated-field detection in proto_utils (prefer field.is_repeated, fall back to field.label on older protobuf runtimes). Will include tests covering both code paths.
Activity
liujuanjuan1984 commentedon Apr 27, 2026
We hit this in downstream integration with
a2a-sdk==1.0.2on a real server path.Concrete repro:
a2a-sdk==1.0.2protobuf==7.34.1DefaultRequestHandler.on_get_task()->@validate_request_params->validate_proto_required_fields()->_check_required_field_violation()AttributeError: 'google._upb._message.FieldDescriptor' object has no attribute 'label'A few details from our side:
a2a-sdk 1.0.2currently declaresRequires-Dist: protobuf>=5.29.5, so a normal resolver can select7.xprotobuf 5.29.5and6.33.5,field.labelis still presentprotobuf 7.34.1,field.labelis absent whilefield.is_repeatedexistsprotobuf<7immediately resolves the crashSo the current
field.labelimplementation is not compatible with all versions allowed by the published dependency range.Given PR #1010 and the direction in this issue, I think there are two viable fixes:
protobuf<7proto_utilsthat prefersfield.is_repeatedwhen available and falls back tofield.labelIf useful, I can also open a PR for the packaging bound change.
fix(deps): cap protobuf below 7 (#1019)
ci: pin protobuf<7 for a2a-sdk integration tests
fix(utils): address review feedback and expand proto_utils test coverage
fix(utils): address review feedback and expand proto_utils test coverage
piyushbag commentedon Jul 21, 2026
Planning to open a PR for backward-compatible repeated-field detection in
proto_utils(preferfield.is_repeated, fall back tofield.labelon older protobuf runtimes). Will include tests covering both code paths.fix: replace deprecated FieldDescriptor.label with is_repeated in pro…
djanito commentedon Aug 20, 2026
Any news on this ?
fix: add temporalfallback for field.is_repeated to support protobuf f…