refactor(client)!: remove ClientTaskManager and related consumers from client#916
Draft
guglielmo-san wants to merge 1 commit intoa2aproject:1.0-devfrom
Draft
Conversation
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/client/base_client.py | 92.21% | 91.85% | 🔴 -0.36% |
| src/a2a/client/client.py | 90.48% | 96.88% | 🟢 +6.40% |
| src/a2a/client/client_factory.py | 89.35% | 89.31% | 🔴 -0.04% |
| Total | 91.50% | 91.48% | 🔴 -0.02% |
Generated by coverage-comment.yml
Contributor
There was a problem hiding this comment.
Code Review
This pull request simplifies the client architecture by removing the Consumer and ClientEvent abstractions along with the ClientTaskManager. Methods such as send_message and subscribe now return an AsyncIterator of StreamResponse directly instead of a tuple. All associated tests and factory methods have been updated to accommodate the removal of consumer-related parameters and the change in return types. A minor formatting improvement was suggested for a docstring in the client factory.
| agent: The base URL of the agent, or the AgentCard to connect to. | ||
| client_config: The ClientConfig to use when connecting to the agent. | ||
| consumers: A list of `Consumer` methods to pass responses to. | ||
|
|
Contributor
There was a problem hiding this comment.
This blank line can be removed to improve the docstring's formatting.
References
- Python docstring conventions (PEP 257) suggest maintaining consistent formatting and avoiding unnecessary blank lines that do not serve to separate the summary from the description. (link)
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.
Description
This PR removes the client side TaskManager, as it represent a redundant duplication of the server-side TaskManager, and the client Consumers, as can be now replicated with the ClientInterceptors