Skip to content

fix: replace deprecated FieldDescriptor.label with is_repeated in proto_utils#1099

Open
Linux2010 wants to merge 2 commits into
a2aproject:mainfrom
Linux2010:fix/1011-proto-utils-is-repeated
Open

fix: replace deprecated FieldDescriptor.label with is_repeated in proto_utils#1099
Linux2010 wants to merge 2 commits into
a2aproject:mainfrom
Linux2010:fix/1011-proto-utils-is-repeated

Conversation

@Linux2010
Copy link
Copy Markdown
Contributor

Summary

Replace all uses of the deprecated FieldDescriptor.label == LABEL_REPEATED pattern with the modern FieldDescriptor.is_repeated property in src/a2a/utils/proto_utils.py.

The minimum required protobuf version (>=5.29.5) already supports is_repeated as a stable API, so this change is safe.

Changes

Closes #1011

…to_utils

Use the non-deprecated FieldDescriptor.is_repeated property instead of
comparing field.label to LABEL_REPEATED. Remove all TODO comments
referencing issue a2aproject#1011.

Closes a2aproject#1011

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Linux2010 Linux2010 requested a review from a team as a code owner June 6, 2026 01:01
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces deprecated usages of field.label with field.is_repeated (and not field.is_repeated) in src/a2a/utils/proto_utils.py, resolving a TODO regarding protobuf version requirements. There are no review comments to evaluate, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Covers the _recurse_validation path for repeated message fields
(e.g. Task.history), which was not previously tested.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 6, 2026

🧪 Code Coverage (vs main)

⬇️ Download Full Report

No coverage changes.

Generated by coverage-comment.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task]: Replace deprecated FieldDescriptor.label with is_repeated in proto_utils

1 participant