Skip to content

feat(python): add aiohttp auto-detection for async HTTP client#13585

Closed
fern-support wants to merge 1 commit intomainfrom
jsklan/aiohttp-python
Closed

feat(python): add aiohttp auto-detection for async HTTP client#13585
fern-support wants to merge 1 commit intomainfrom
jsklan/aiohttp-python

Conversation

@fern-support
Copy link
Collaborator

Summary

WIP — This PR modifies the seed fixture output directly. Generator changes to produce this output will follow.

  • Auto-detect httpx_aiohttp at runtime and use it for the async HTTP client when available, falling back to plain httpx.AsyncClient
  • Add DefaultAioHttpClient and DefaultAsyncHttpxClient convenience classes with SDK-appropriate defaults
  • Add _default_clients.py module with optional [aiohttp] extra in pyproject.toml
  • Add pytest-based tests with @pytest.mark.aiohttp marker for two-pass testing (without and with aiohttp installed)

Based on: cohere-ai/cohere-python#739

Test plan

  • pytest -m "not aiohttp" — 6 tests pass (fallback behavior without httpx_aiohttp)
  • pip install httpx-aiohttp && pytest -m "aiohttp" — 3 tests pass (autodetect with httpx_aiohttp)
  • Update generator to produce this output
  • Run seed tests to validate generator matches fixture

When httpx_aiohttp is installed, the async client automatically uses it
instead of plain httpx.AsyncClient. Adds DefaultAioHttpClient and
DefaultAsyncHttpxClient convenience classes with SDK defaults.
@claude
Copy link

claude bot commented Mar 16, 2026

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit in Settings → Usage.

Once credits are available, reopen this pull request to trigger a review.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants