fix(helloworld): regenerate uv.lock to fix create_client ImportError - #699
Open
Devansh0112 wants to merge 1 commit into
Open
fix(helloworld): regenerate uv.lock to fix create_client ImportError#699Devansh0112 wants to merge 1 commit into
Devansh0112 wants to merge 1 commit into
Conversation
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.
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.
Problem
samples/python/agents/helloworld/test_client.pyimportscreate_clientfroma2a.client, which was added ina2a-sdkv1.0. The workspace'suv.lockwas still pinned toa2a-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-sdkto regeneratesamples/python/uv.lock. This bumpsa2a-sdk0.3.26 → 1.1.2, and as a direct consequence of the re-resolve:a2a-sdk's own transitive deps (dropshttpx-sse, addsjson-rpc+packaging; itshttp-serverextra was folded into the base package)ag20.11.5 → 0.13.0 (itsa2aextra depends ona2a-sdk, and the old locked version wasn't compatible with 1.1.2)timestamp-extworkspace-member entry, already removed frompyproject.toml— pre-existing drift any freshuv lockrun surfaces, unrelated to this bug specificallyThis mirrors the v1.0 migration already done for another sample (commit
5fa24f7,a2a-mcp-without-framework) —helloworldappears to have been missed in that pass.Testing
Verified end-to-end locally: ran the Java
a2a-javahello-world server (examples/helloworld/server,mvn quarkus:dev), thenuv run test_client.pyagainst it — client fetches the agent card and successfully exchanges messages.Ran
uv run ruff check --fix/uv run ruff formaton the sample directory (no changes needed — only the lockfile changed). No dedicated test suite exists forhelloworldundertests/python/agents/.