Skip to content

fix(helloworld): regenerate uv.lock to fix create_client ImportError - #699

Open
Devansh0112 wants to merge 1 commit into
a2aproject:mainfrom
Devansh0112:fix/helloworld-lockfile-a2a-sdk-version
Open

fix(helloworld): regenerate uv.lock to fix create_client ImportError#699
Devansh0112 wants to merge 1 commit into
a2aproject:mainfrom
Devansh0112:fix/helloworld-lockfile-a2a-sdk-version

Conversation

@Devansh0112

Copy link
Copy Markdown

Problem

samples/python/agents/helloworld/test_client.py imports create_client from a2a.client, which was added in a2a-sdk v1.0. The workspace's uv.lock was still pinned to a2a-sdk==0.3.26 (pre-1.0), so following this sample's own README exactly (uv venv / uv sync, uv run test_client.py) fails immediately with:
ImportError: cannot import name 'create_client' from 'a2a.client'

Fix

Ran uv lock --upgrade-package a2a-sdk to regenerate samples/python/uv.lock. This bumps a2a-sdk 0.3.26 → 1.1.2, and as a direct consequence of the re-resolve:

  • Updates a2a-sdk's own transitive deps (drops httpx-sse, adds json-rpc + packaging; its http-server extra was folded into the base package)
  • Bumps ag2 0.11.5 → 0.13.0 (its a2a extra depends on a2a-sdk, and the old locked version wasn't compatible with 1.1.2)
  • Drops the stale timestamp-ext workspace-member entry, already removed from pyproject.toml — pre-existing drift any fresh uv lock run surfaces, unrelated to this bug specifically

This mirrors the v1.0 migration already done for another sample (commit 5fa24f7, a2a-mcp-without-framework) — helloworld appears to have been missed in that pass.

Testing

Verified end-to-end locally: ran the Java a2a-java hello-world server (examples/helloworld/server, mvn quarkus:dev), then uv run test_client.py against it — client fetches the agent card and successfully exchanges messages.

Ran uv run ruff check --fix / uv run ruff format on the sample directory (no changes needed — only the lockfile changed). No dedicated test suite exists for helloworld under tests/python/agents/.

test_client.py uses a2a.client.create_client(), added in a2a-sdk v1.0. The workspace's uv.lock was still pinned to a2a-sdk==0.3.26 (pre-1.0), so running the client fails with: ImportError: cannot import name 'create_client' from 'a2a.client'

Ran 'uv lock --upgrade-package a2a-sdk' to regenerate the lockfile. This also surfaces two pre-existing, unrelated pieces of lockfile drift that any fresh 'uv lock' run would pick up: (1) the 'timestamp-ext' workspace member, already removed from pyproject.toml, is dropped from the lock; (2) a2a-sdk's own transitive deps shift (httpx-sse dropped, json-rpc + packaging added) as part of its 0.3.26 -> 1.1.2 upgrade.

Verified locally: after this change, uv run test_client.py successfully connects to a live a2a-java hello-world server and exchanges messages.
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