Skip to content

fix: restore Python SDK compatibility for conformance and samples#17

Closed
adrianmcphee wants to merge 3 commits intoUniversal-Commerce-Protocol:mainfrom
adrianmcphee:main
Closed

fix: restore Python SDK compatibility for conformance and samples#17
adrianmcphee wants to merge 3 commits intoUniversal-Commerce-Protocol:mainfrom
adrianmcphee:main

Conversation

@adrianmcphee
Copy link

Summary

  • fix schema initialization order by defining Version, ReverseDomainName, and Entity before dependent models
  • make Version and ReverseDomainName hashable (frozen=True) for dict-key use
  • normalize discovery-profile parsing in Pydantic v2 to accept both legacy and keyed/generated payload shapes
  • restore legacy module compatibility for conformance and samples (*_req / *_resp aliases)
  • add AP2 compatibility aliases used by clients (Ap2CompleteRequest, CheckoutResponseWithAp2)

Validation

  • conformance module import smoke test passes (14/14) with editable-installed SDK
  • ProtocolTest.test_discovery passes against a local mock discovery server
  • IntegrationTestBase smoke path passes (service endpoint resolution + checkout payload construction)
  • discovery parsing verified for both legacy and keyed payload formats

@adrianmcphee adrianmcphee requested a review from a team as a code owner March 3, 2026 20:04
@google-cla
Copy link

google-cla bot commented Mar 3, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@damaz91
Copy link
Contributor

damaz91 commented Mar 4, 2026

@adrianmcphee we are working on updating the SDK, most of the issues you are noting here should be fixed in #16 - as for retro-compatibility with samples and conformance, we'll need to update those as well

@damaz91 damaz91 closed this Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants