refactor(grpc): eliminate third-party grpcio-status dependency#1130
refactor(grpc): eliminate third-party grpcio-status dependency#1130Iwaniukooo11 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the dependency on grpcio-status across the codebase. The grpc_status library usage has been replaced with custom, lightweight helper functions (_from_call in the gRPC client transport and _to_status in the gRPC server request handler) to extract and convert rich gRPC status details. Additionally, pyproject.toml was updated to remove grpcio-status from the grpc extra, and some minor formatting and indentation adjustments were made. There are no review comments, so I have no additional 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.
ddf51a7 to
3fa48cb
Compare
Replaced grpcio-status imports with local implementations _from_call and _to_status in client and server transport layers. Removed the grpcio-status dependency from pyproject.toml.
3fa48cb to
0d77788
Compare
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/client/transports/grpc.py | 92.75% | 88.55% | 🔴 -4.20% |
| src/a2a/server/events/event_queue_v2.py | 91.19% | 91.71% | 🟢 +0.52% |
| src/a2a/server/request_handlers/grpc_handler.py | 95.42% | 94.61% | 🔴 -0.81% |
| src/a2a/utils/telemetry.py | 90.70% | 91.47% | 🟢 +0.78% |
| Total | 92.99% | 92.92% | 🔴 -0.07% |
Generated by coverage-comment.yml
PR: Eliminate
grpcio-statusDependencySummary
Dumped the third-party dependency
grpcio-statusto reduce the SDK's attack surface. Replaced it with native helper functions in the client and server transport layers.Changes
grpcio-statusfrompyproject.tomland updateduv.lock.grpc.py): Replacedrpc_status.from_callwith a local_from_callhelper that parses status payloads and validates details.grpc_handler.py): Replacedrpc_status.to_statuswith a local_to_statushelper that maps status codes and returns a typedGrpcStatusnamedtuple.Verification
Ran tests and linters locally with
grpcio-statusuninstalled:Status: 73 tests passed, linter green.