Add awscrt extra to generated pyproject.toml - #769
Open
jonathan343 wants to merge 1 commit into
Open
Conversation
Expose a `[project.optional-dependencies]` awscrt extra so users can opt into the CRT transport without pinning an awscrt version. The extra re-exports smithy_http's awscrt extra, and is skipped when the client already requires awscrt (e.g. http2 services defaulting to CRT).
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.
Summary
Generated clients now expose a
[project.optional-dependencies]awscrt extra so users can opt into the CRT transport (AWSCRTHTTPClient) without having to pin a compatible awscrt version themselves. The extra re-exports smithy_http's own awscrt extra, so the version constraint stays sourced from smithy-http.The set of extras is data-driven through
collectOptionalDependencies. The awscrt extra is skipped when the client already requires awscrt, such as an http2 service that defaults to the CRT transport, where there is nothing to opt into. Note: These will be swapping to aiohttp as the default soon.Also drops a dead try/catch in getOptionalDependencies and adds a unit test covering the aiohttp default path.
Example
This is an example of what gets added to the
pyproject.tomlfor affected packages:This allows customers to install a compatible version of awscrt through
uv pip install "aws-sdk-sts[awscrt]"By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.