Skip to content

Commit 5cb4611

Browse files
committed
fix(acp_zed): move examples into subdir to avoid acp.py import shadow
Running `python examples/serve/acp_zed_lite.py` puts `examples/serve/` on `sys.path[0]`, where `from acp import ...` inside the adapter resolves to the sibling `examples/serve/acp.py` (the IBM/BeeAI ACP example) instead of the Zed SDK's `acp` package. The shadowed module then drags in `acp_sdk`, which has a separate pre-existing uvicorn incompatibility, and the whole import chain collapses with `AttributeError: module 'uvicorn.config' has no attribute 'LoopSetupType'`. Move the three Zed ACP entrypoints into `examples/serve/acp_zed/`: - `examples/serve/acp_zed.py` → `examples/serve/acp_zed/simple.py` - `examples/serve/acp_zed_kiwi.py` → `examples/serve/acp_zed/kiwi.py` - `examples/serve/acp_zed_lite.py` → `examples/serve/acp_zed/lite.py` With this layout, running the script places `examples/serve/acp_zed/` on `sys.path[0]` instead, so `acp` resolves to the installed SDK and no shadow can occur. Docstring launch snippets and the `test_examples.py` exclusion glob are updated to match. Signed-off-by: Tomáš Dvořák <toomas2d@gmail.com>
1 parent bc13f85 commit 5cb4611

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"agent_servers": {
1111
"beeai-kiwi": {
1212
"command": "python",
13-
"args": ["/absolute/path/to/examples/serve/acp_zed_kiwi.py"]
13+
"args": ["/absolute/path/to/examples/serve/acp_zed/kiwi.py"]
1414
}
1515
}
1616
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"agent_servers": {
1010
"beeai-lite": {
1111
"command": "python",
12-
"args": ["/absolute/path/to/examples/serve/acp_zed_lite.py"]
12+
"args": ["/absolute/path/to/examples/serve/acp_zed/lite.py"]
1313
}
1414
}
1515
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"agent_servers": {
77
"beeai": {
88
"command": "python",
9-
"args": ["/absolute/path/to/examples/serve/acp_zed.py"]
9+
"args": ["/absolute/path/to/examples/serve/acp_zed/simple.py"]
1010
}
1111
}
1212
}

‎python/tests/examples/test_examples.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@
4545
"agents/providers/watsonx_orchestrate.py",
4646
"workflows/remote.py",
4747
"serve/acp.py",
48-
"serve/acp_zed.py",
49-
"serve/acp_zed_kiwi.py",
50-
"serve/acp_zed_lite.py",
48+
"serve/acp_zed/*.py",
5149
"serve/agent_stack.py",
5250
"serve/agent_stack_custom.py",
5351
"serve/agent_stack_await.py",

0 commit comments

Comments
 (0)