Skip to content

chore(timestamp): python sample A2A 1.0.3 update#624

Open
Iwaniukooo11 wants to merge 11 commits into
a2aproject:mainfrom
Iwaniukooo11:mateusziwaniuk/timestamp-python-sample-update
Open

chore(timestamp): python sample A2A 1.0.3 update#624
Iwaniukooo11 wants to merge 11 commits into
a2aproject:mainfrom
Iwaniukooo11:mateusziwaniuk/timestamp-python-sample-update

Conversation

@Iwaniukooo11

Copy link
Copy Markdown

Refactor: Update timestamp extension to a2a-sdk v1.0.3 and migrate to pip

Overview

This PR refactors the timestamp extension sample to align it with the stable a2a-sdk v1.0.3 API specification, improves internal naming conventions for better readability, and transitions the project's dependency management from uv to standard pip and requirements.txt.


Key Changes

1. Project Layout Re-organization

  • Standard Package Structure: Re-structured the extension layout to follow standard Python packaging best practices:
    • Moved all core source files into a dedicated src/timestamp_ext/ package (containing client.py, core.py, and server.py).
    • Consolidated and migrated test files into the tests/ directory (containing __main__.py and test_client.py).

2. Upgrade to a2a-sdk v1.0.3 Stable API

  • Facade Imports: Migrated all legacy internal protobuf import paths (e.g., a2a.types.a2a_pb2 and a2a.helpers.proto_helpers) to the clean, stable a2a.types and a2a.helpers facades across all source and test files.
  • String Bindings: Replaced the deprecated TransportProtocol.JSONRPC enum references with standard string literals ('JSONRPC') directly in AgentInterface setup.
  • Dependency Bump: Updated pyproject.toml version constraint to target a2a-sdk>=1.0.3.

3. Dependency Management Transition (uv $\rightarrow$ pip)

  • Auto-compiled requirements.txt: Generated a fully resolved and pinned requirements.txt from pyproject.toml using uv pip compile to support standard pip install environments.
  • Lockfile Cleanup: Safely removed the legacy uv.lock file.

4. Readability & Explicit Naming

  • Self-Documenting Delegates: Renamed all generic delegate variables, parameters, and fields to highly explicit, self-documenting names for better architecture visibility:
    • delegate $\rightarrow$ delegate_client (in _TimestampingClient)
    • delegate $\rightarrow$ delegate_client_factory (in _TimestampingClientFactory)
    • delegate $\rightarrow$ delegate_agent_executor (in _TimestampingAgentExecutor)
    • delegate $\rightarrow$ delegate_event_queue (in _TimestampingEventQueue)

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request restructures the Python Timestamp Extension showcase by modularizing the codebase into separate core, client, and server modules, updating the documentation, and adding integration tests. The review feedback identifies several critical issues: Python 3.10 compatibility is broken by using datetime.UTC instead of datetime.timezone.utc in both the core logic and tests; the integration tests risk hanging indefinitely due to unread subprocess pipes and a lack of timeout during process termination; and the README contains a documentation error where ClientFactory is instantiated with an incorrect parameter name.

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.

Comment thread samples/python/extensions/timestamp/src/timestamp_ext/core.py Outdated
Comment thread samples/python/extensions/timestamp/tests/test_client.py Outdated
Comment thread samples/python/extensions/timestamp/tests/test_client.py Outdated
Comment thread samples/python/extensions/timestamp/tests/test_client.py
Comment thread samples/python/extensions/timestamp/README.md Outdated
@Iwaniukooo11 Iwaniukooo11 changed the title Mateusziwaniuk/timestamp python sample update chore(timestamp): python sample A2A 1.0.3 update Jun 30, 2026
@Iwaniukooo11 Iwaniukooo11 force-pushed the mateusziwaniuk/timestamp-python-sample-update branch from c23e8d9 to eb643bc Compare June 30, 2026 09:18
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