Skip to content

fix(deps): cap protobuf below 7#1019

Merged
sokoliva merged 1 commit intoa2aproject:mainfrom
liujuanjuan1984:fix/protobuf-upper-bound
Apr 27, 2026
Merged

fix(deps): cap protobuf below 7#1019
sokoliva merged 1 commit intoa2aproject:mainfrom
liujuanjuan1984:fix/protobuf-upper-bound

Conversation

@liujuanjuan1984
Copy link
Copy Markdown
Contributor

Summary

  • tighten the published protobuf dependency range to <7
  • keep the declared range aligned with the current proto_utils implementation, which still relies on FieldDescriptor.label
  • update uv.lock metadata to match

Why

a2a-sdk 1.0.2 currently publishes protobuf>=5.29.5, which allows resolvers to select protobuf 7.x.

In downstream testing, a2a-sdk==1.0.2 with protobuf==7.34.1 crashes on the DefaultRequestHandler.on_get_task() path:

  • @validate_request_params
  • validate_proto_required_fields()
  • _check_required_field_violation()
  • AttributeError: 'google._upb._message.FieldDescriptor' object has no attribute 'label'

This PR applies the minimal packaging fix that matches the current implementation choice from #1010 while broader code-level compatibility is discussed in #1011.

Relates to #1011

Validation

  • uv run ruff check --fix
  • uv run ruff format
  • uv run mypy src
  • uv run pyright src
  • uv run pytest

pytest result locally:

  • 1671 passed, 90 skipped, 3 xfailed, 4 errors
  • the 4 errors were all in tests/integration/cross_version/client_server/test_client_server.py
  • they were startup failures for the server_0_3.py subprocess path using uv run --with a2a-sdk[grpc]==0.3.24 --no-project ...
  • these failures do not exercise the changed dependency declaration in this PR

@github-actions
Copy link
Copy Markdown

🧪 Code Coverage (vs main)

⬇️ Download Full Report

Base PR Delta
src/a2a/server/events/event_queue_v2.py 91.71% 91.19% 🔴 -0.52%
src/a2a/utils/telemetry.py 91.41% 90.63% 🔴 -0.78%
Total 93.03% 93.00% 🔴 -0.02%

Generated by coverage-comment.yml

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 updates the protobuf dependency version constraint to >=5.29.5,<7 in both pyproject.toml and uv.lock. I have no feedback to provide.

@sokoliva sokoliva self-requested a review April 27, 2026 08:57
@sokoliva
Copy link
Copy Markdown
Member

Hi @liujuanjuan1984,

Thank you for bringing this to our attention and for fixing the issue. I replicated the error you got and confirmed the fix you offered.

@sokoliva sokoliva merged commit 7af6050 into a2aproject:main Apr 27, 2026
34 checks passed
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.

2 participants