Skip to content

Commit 1240493

Browse files
lesnik512claude
andcommitted
docs(spec): clarify pydantic-decoder fallback is not opt-in today
Self-review found an inconsistency: the spec described decoder=None as falling back only if pydantic is installed, but 0.1.0 actually imports pydantic at decoders/pydantic.py top level and unconditionally instantiates PydanticDecoder() as the default. Note the gap; defer the tightening. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 55a5a65 commit 1240493

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

planning/specs/2026-06-03-thin-httpx2-wrapper-design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class AsyncClient:
112112

113113
Passing `httpx2_client=` together with any of the forwarded kwargs raises `TypeError`. When `httpx2_client=` is provided, `AsyncClient` does NOT close it on `__aexit__`; the caller owns the lifecycle.
114114

115-
When `decoder` is `None`, the client falls back to `PydanticDecoder()` if the `pydantic` extra is installed, otherwise no decoder is configured and any call with `response_model=` raises a clear error.
115+
When `decoder` is `None`, the client falls back to `PydanticDecoder()` — same behavior as 0.1.0. (Pydantic is declared as an optional extra in `pyproject.toml`; in practice 0.1.0 imports `pydantic` at the top of `decoders/pydantic.py` and re-exports `PydanticDecoder` from the package root, so the "opt-in" framing is aspirational. Tightening that — guarding the `pydantic` import the same way `decoders/msgspec.py` guards `msgspec` — is a follow-up cleanup, not part of this pivot.)
116116

117117
### Per-method surface
118118

0 commit comments

Comments
 (0)