fix(compat): avoid unconditional grpc import in v0.3 context builders#1006
Merged
fix(compat): avoid unconditional grpc import in v0.3 context builders#1006
Conversation
d2072ff to
59680c2
Compare
Contributor
There was a problem hiding this comment.
Code Review
This pull request enhances the smoke testing suite by introducing installation profiles, allowing verification that specific extras like http-server can be imported without unnecessary dependencies. Key changes include updating the Python smoke test script to support multiple profiles and adding a shell script to automate the build and installation process in clean environments using uv. Feedback highlights a potential NameError in context_builders.py due to moving the grpc import into a TYPE_CHECKING block without enabling deferred annotation evaluation, and suggests a more robust method for identifying the built wheel in the shell script.
59680c2 to
9625293
Compare
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/compat/v0_3/context_builders.py | 92.00% | 100.00% | 🟢 +8.00% |
| Total | 93.00% | 93.02% | 🟢 +0.02% |
Generated by coverage-comment.yml
9625293 to
d57f888
Compare
sokoliva
approved these changes
Apr 22, 2026
ishymko
added a commit
that referenced
this pull request
Apr 22, 2026
🤖 I have created a release *beep* *boop* --- ## [1.0.1](v1.0.0...v1.0.1) (2026-04-22) ### Bug Fixes * **compat:** avoid unconditional grpc import in v0.3 context builders ([#1006](#1006)) ([6b46ceb](6b46ceb)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Ivan Shymko <ishymko@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently it causes
no module named 'grpc'when using HTTP machinery.Relevant "install and import" testing was extended to allow testing "extras" to catch this in the future.