Repository navigation
Generate endpoint BDDs for Python clients - #959
Merged
stobrien89 merged 3 commits intoNov 17, 2026
Merged
Conversation
kuhe
approved these changes
Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Stacked on #957.
Description of changes:
Python clients now resolve endpoints from the service's
endpointBddtrait. Before, the generator rejected any service with endpoint rules._endpoints.pylowers the trait into_private/endpoints.py. It's a port of the JavaEndpointBddGenerator, and the output matches Java byte for byte on all 435 AWS models that carry the trait.BddEndpointResolver(BDD). EachclientContextParamsentry becomes astr | Noneorbool | Noneconfig field.endpointRuleSetand noendpointBdd(compiling a ruleset needs Smithy'sCompileBdd)aws.partitioncontextParam,staticContextParamsandoperationContextParams, which the runtime parameter plan reads. This replaces the staleendpointBddentry and matches Java.endpointTestscase becomes a test intests/test_endpoints.py, using the same layout as Java. Each case gets a rules test, and each operation input also gets a client test that calls the async client. Nested input values are written as dicts instead of models. A case the client can't express is skipped, with the reason.endpoint-rules-clientsnapshot. Its source ismodels/endpoint-rules.smithy, assembled and BDD-compiled by Smithy. The snapshot tests run its generated tests: 14 pass and 1 is skipped (anAWS::Regioncase).smithy-core ~=0.13.0andsmithy-http ~=0.10.0.The client snapshots are regenerated, and the protocol vectors still pass.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.