Repository navigation
Commit 5cb4611
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 48 | + | |
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
| |||
0 commit comments