From f3baf2b72b1684241260c2772c45247d1143f59a Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Sun, 31 May 2026 23:53:45 +0300 Subject: [PATCH] docs(readme): drop compose() mention; it's not public API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The README bullet under "Middleware foundation" named compose() as if it were a user-callable function. `compose` lives at `httpware._internal.chain.compose` per the seam-1 design — `Middleware` chain composition is an internal AsyncClient concern, not a consumer API. A user reading the bullet and trying `from httpware import compose` would hit ImportError. Replaces the compose() reference with a one-line note: "The chain is composed at AsyncClient construction; consumers don't compose chains themselves." Honest about how middleware is wired without exposing internal symbols. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7b1db91..344f6ac 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ async def main() -> None: - **`AsyncClient`** — eight HTTP method shortcuts (`get`, `post`, `put`, `patch`, `delete`, `head`, `options`, `request`) with typed `response_model` overloads; per-call overrides for `headers`, `params`, `cookies`, `timeout`, `json`, `content`; httpx-style `base_url` join; `with_options(...)` returns a view sharing the same transport. - **Transport-agnostic seam.** `httpx2` is confined to `httpware.transports.httpx2.Httpx2Transport`. Implement the `Transport` protocol to swap backends. -- **Middleware foundation.** `Middleware` protocol, `Next` type alias, recursive-closure `compose()` chain composition, and phase decorators (`@before_request`, `@after_response`, `@on_error`). +- **Middleware foundation.** `Middleware` protocol, `Next` type alias, and phase decorators (`@before_request`, `@after_response`, `@on_error`). The chain is composed at `AsyncClient` construction; consumers don't compose chains themselves. - **Pluggable response decoding.** `PydanticDecoder` (default) with cached `TypeAdapter`; `MsgspecDecoder` via `httpware[msgspec]`. - **`RecordedTransport`** — built-in test double with a route table, observed-request list, and `aclose_calls` counter. - **Status-keyed exception hierarchy** — `StatusError`, 4xx / 5xx subclasses, plain typed fields (`status: int`, `body: bytes`, `headers`, `json`, `request_method`, `request_url`). Pickleable; userinfo redacted in `__repr__`.