Symptom
Following rest/python/server/README.md exactly on fresh clones (both repos at today's main), the database step succeeds but the server fails to start:
File ".../samples/rest/python/server/models.py", line 23, in <module>
from ucp_sdk.models.schemas.shopping.ap2_mandate import Checkout as Ap2Checkout
ImportError: cannot import name 'Checkout' from 'ucp_sdk.models.schemas.shopping.ap2_mandate'
Since the README instructs an unpinned git clone https://github.com/Universal-Commerce-Protocol/python-sdk.git (and pyproject.toml uses an unversioned path dependency), every new contributor following the README hits this today.
Bisect
PR #48 regenerated the models for the 04-08 schemas; ap2_mandate now exports Ap2MandateExtension/Ap2WithCheckoutMandate/… and no longer has the composed Checkout that models.py L23 and integration_test.py L48 import. Verified reproducible: samples @ 827c522, sdk @ ee3a15c, macOS + uv.
Why CI didn't catch it
The samples workflows are lint/governance only — nothing builds or boot-tests the Python server against the SDK, so this class of cross-repo breakage is silent.
Suggested fixes (in order)
- Interim unblock: pin the SDK in the README until the migration lands — add
git checkout f54858e after the clone (verified: server starts and serves with this pin).
- Real fix: migrate the Python server to the 04-08 SDK models (the removed class is used in
models.py and integration_test.py; there's no drop-in rename, so this is part of the broader 2026-04-08 upgrade).
- Prevention: add a CI job that runs
uv sync + boots the server (or just imports server.py) against sdk main — it would have flagged this on 2026-06-30.
Found while building an unofficial UCP conformance test suite (https://spck.dev). Happy to help with any of the above.
Symptom
Following
rest/python/server/README.mdexactly on fresh clones (both repos at today's main), the database step succeeds but the server fails to start:Since the README instructs an unpinned
git clone https://github.com/Universal-Commerce-Protocol/python-sdk.git(andpyproject.tomluses an unversioned path dependency), every new contributor following the README hits this today.Bisect
f54858e(pre-Dołącz do nas – Świątynia Wampira #48): import OK, server boots and serves (HTTP 200) ✅298c295(PR Dołącz do nas – Świątynia Wampira #48, "upgrade Python SDK to UCP v2026-04-08", merged 2026-06-30): ImportError ❌ee3a15c): ImportError ❌PR #48 regenerated the models for the 04-08 schemas;
ap2_mandatenow exportsAp2MandateExtension/Ap2WithCheckoutMandate/… and no longer has the composedCheckoutthatmodels.pyL23 andintegration_test.pyL48 import. Verified reproducible: samples @827c522, sdk @ee3a15c, macOS + uv.Why CI didn't catch it
The samples workflows are lint/governance only — nothing builds or boot-tests the Python server against the SDK, so this class of cross-repo breakage is silent.
Suggested fixes (in order)
git checkout f54858eafter the clone (verified: server starts and serves with this pin).models.pyandintegration_test.py; there's no drop-in rename, so this is part of the broader 2026-04-08 upgrade).uv sync+ boots the server (or just importsserver.py) against sdk main — it would have flagged this on 2026-06-30.Found while building an unofficial UCP conformance test suite (https://spck.dev). Happy to help with any of the above.