Skip to content

Document Python http_client_extra config option - #7595

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1792861757-python-http-client-extra
Open

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1792861757-python-http-client-extra

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Python SDKs can now keep the HTTP client (httpx) out of the base install and expose it behind a named pip extra. That matters for SDK owners whose users only consume the generated models (for example, building or parsing TwiML/XML types): pip install your-package then needs only Pydantic and typing_extensions, and API callers run pip install your-package[client].

Implements docs for: fix(python): http_client_extra option declares httpx as an optional extra for model-only (TwiML) installs (fern-api/fern#18429)

Changes

  • fern/products/sdks/legacy/generators/python/configuration.mdx: new http_client_extra ParamField (alphabetical, between extras and flat_layout). It covers the generators.yml example, the pip install command, httpx being added to the built-in aiohttp extra, the ImportError you get when the client is imported without the extra, and the two validation rules from custom_config.py (the value can't be aiohttp, and lazy_imports must stay enabled). Without the option, httpx stays a required dependency.

Not changed (on purpose)

Verification

  • Checked behavior against generators/python/src/fern_python/generators/sdk/custom_config.py, sdk_generator.py, and the seed fixture seed/python-sdk/python-xml-twiml/http-client-extra/pyproject.toml in fern-api/fern.
  • pre-commit (Vale) reports no new findings on the changed lines; the 4 errors it lists were already on the page. fern check --warnings reports 0 errors.

Link to Devin session: https://app.devin.ai/sessions/b1db92f633924ef9a471379068f060df
Open in Devin Desktop: https://app.devin.ai/desktop/session/b1db92f633924ef9a471379068f060df?variant=devin

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

Copy link
Copy Markdown
Contributor

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.

0 participants