a2aproject / a2aproject/a2a-tck
[Bug]: Generated Python SUT fails to import — codegen template mixes pre-1.0 and 1.0 a2a-python APIs
- 主要言語
- Python
- スター
- 50
- フォーク
- 40
- 平均マージ
- 7日 1時間
- マージ済み PR(30日)
- 1
説明
### What happened?
codegen/a2a-python/sut_agent.py.j2 mixes two incompatible generations of the a2a-python SDK API, so the SUT generated by make codegen-a2a-python-sut fails to import against any currently installable SDK version.
Primarily :
https://github.com/a2aproject/a2a-tck/blob/5996b79f9cefa6fc390980e383e358a66fb9e49e/codegen/a2a-python/sut_agent.py.j2#L24
and
https://github.com/a2aproject/a2a-tck/blob/5996b79f9cefa6fc390980e383e358a66fb9e49e/codegen/a2a-python/sut_agent.py.j2#L18
**Suggested fix**
Migrate sut_agent.py.j2 to the 1.x route-factory API, dropping the removed A2AStarletteApplication / A2ARESTFastAPIApplication imports.
Bump _DEFAULT_A2A_PYTHON_SDK_VERSION to a current 1.x release.
Verify by regenerating the SUT, booting it, and confirming ./run_tck.py runs successfully against it.
Happy to work on a fix for this if useful — flagging first since I know the SDK is mid-migration and this may already be tracked elsewhere.
### Relevant log output
```shell
Traceback (most recent call last):
File "/Users//a2a-tck/sut/a2a-python/sut_agent.py", line 22, in
from a2a.server.apps import (
...<2 lines>...
)
ModuleNotFoundError: No module named 'a2a.server.apps'
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
コントリビューションガイド
評価
この issue はまだ評価されていません。