Skip to content

Add awscrt extra to generated pyproject.toml - #769

Open
jonathan343 wants to merge 1 commit into
developfrom
add-awscrt-extra
Open

Add awscrt extra to generated pyproject.toml#769
jonathan343 wants to merge 1 commit into
developfrom
add-awscrt-extra

Conversation

@jonathan343

Copy link
Copy Markdown
Contributor

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.toml for affected packages:

[project.optional-dependencies]
awscrt = [
    "smithy_http[awscrt]~=0.4.0"
]

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.

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).
@jonathan343
jonathan343 requested a review from a team as a code owner August 15, 2026 06:51
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.

1 participant