Skip to content

feat(client): Rename ClientFactory to A2AClientFactory#886

Open
zeroasterisk wants to merge 1 commit intoa2aproject:1.0-devfrom
zeroasterisk:feat/555-client-factory
Open

feat(client): Rename ClientFactory to A2AClientFactory#886
zeroasterisk wants to merge 1 commit intoa2aproject:1.0-devfrom
zeroasterisk:feat/555-client-factory

Conversation

@zeroasterisk
Copy link
Contributor

Completed task 555: Renamed ClientFactory to A2AClientFactory for backwards compatibility and spec alignment while auto-selecting transport based on supportedInterfaces. Exported both ClientFactory and A2AClientFactory.

@zeroasterisk zeroasterisk requested a review from a team as a code owner March 22, 2026 00:10
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the client factory implementation by renaming ClientFactory to A2AClientFactory. This change enhances code clarity and aligns the naming with project specifications. Crucially, it maintains backward compatibility by ensuring both the old and new class names are available for use, preventing breaking changes for existing consumers. The update also incorporates improved logic for automatically selecting the correct transport based on supported interfaces.

Highlights

  • Class Renaming: The ClientFactory class was renamed to A2AClientFactory for improved clarity and alignment with specifications.
  • Backward Compatibility: Both ClientFactory and A2AClientFactory are now exported, ensuring existing code using the old name continues to function without breaking changes.
  • Transport Selection: The client factory now includes logic for auto-selecting the appropriate transport mechanism based on supportedInterfaces.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
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 renames ClientFactory to A2AClientFactory and provides a backward-compatibility alias. The changes are consistent across the codebase. My review includes one suggestion to add a TODO comment for future deprecation of the alias. Additionally, consider updating the tests in tests/client/test_client_factory.py to use the new A2AClientFactory name to align with the API changes.

)


ClientFactory = A2AClientFactory
Copy link
Contributor

Choose a reason for hiding this comment

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

low

While this alias is great for backward compatibility, it's a good practice to plan for its eventual deprecation to encourage users to adopt the new A2AClientFactory name. Adding a TODO comment here can help track this for the future.

Suggested change
ClientFactory = A2AClientFactory
ClientFactory = A2AClientFactory # TODO: Deprecate in favor of A2AClientFactory

@github-actions
Copy link

🧪 Code Coverage (vs 1.0-dev)

⬇️ Download Full Report

Base PR Delta
src/a2a/client/client_factory.py 89.35% 89.41% 🟢 +0.06%
Total 91.45% 91.45% ⚪️ 0.00%

Generated by coverage-comment.yml

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