Skip to content

refactor(client)!: remove ClientTaskManager and related consumers from client#916

Draft
guglielmo-san wants to merge 1 commit intoa2aproject:1.0-devfrom
guglielmo-san:guglielmoc/remove_client_side_task_manager
Draft

refactor(client)!: remove ClientTaskManager and related consumers from client#916
guglielmo-san wants to merge 1 commit intoa2aproject:1.0-devfrom
guglielmo-san:guglielmoc/remove_client_side_task_manager

Conversation

@guglielmo-san
Copy link
Copy Markdown
Member

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

@github-actions
Copy link
Copy Markdown

🧪 Code Coverage (vs 1.0-dev)

⬇️ Download Full Report

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

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 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

low

This blank line can be removed to improve the docstring's formatting.

References
  1. 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)

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.

1 participant