Skip to content

Make generated client transport dependencies opt-in - #936

Draft
jonathan343 wants to merge 4 commits into
developfrom
feat/client-mode-extras
Draft

jonathan343 wants to merge 4 commits into
developfrom
feat/client-mode-extras

Conversation

@jonathan343

Copy link
Copy Markdown
Contributor

Summary

Generated HTTP clients currently install both aiohttp and urllib3, even when an application uses only one client mode. Move those dependencies into sync and async extras so customers install only the default transport dependencies they need.

Both clients, their configurations, and shared models remain in the same package with unchanged imports. Protocol dependencies and the existing CRT extra are unchanged. The mode extras also provide installation commands that can be retained if client implementations move into separate distributions later. This change does not split packages or add new transports.

Example

For a service package generated with this change, in a uv-managed project:

uv add "aws-sdk-s3[sync]"        # Default synchronous transport
uv add "aws-sdk-s3[async]"       # Default asynchronous transport
uv add "aws-sdk-s3[sync,async]"  # Both default transports

Or with pip:

pip install "aws-sdk-s3[sync]"
pip install "aws-sdk-s3[async]"
pip install "aws-sdk-s3[sync,async]"

A bare install still supports shared models and clients configured with a custom transport. Using a default transport without its dependency installed raises MissingDependencyError naming the required optional dependency, without prescribing a package manager.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Expose sync and async extras for generated clients while keeping shared models and custom transports usable without either default HTTP dependency. Preserve test dependency extras and add installation advice for missing transports.
@jonathan343 jonathan343 changed the title Feat/client mode extras Make generated client transport dependencies opt-in Nov 12, 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.

1 participant