Repository navigation
v2.1.0 — native async, streaming and typed APIs
Highlights
- Native
AsyncSession,AsyncResponseandAsyncConnectionPool, retaining
project-owned TLS 1.2/1.3, ClientHello controls and HTTP/2 state. - Incremental HTTP/1.1 and HTTP/2 responses, including gzip/deflate/Brotli
decoding, explicit response ownership and stream-scoped HTTP/2 cancellation. - Public inline types and
py.typed, installed-consumer type checks, local
MkDocs guides/API references and reproducible sync/async performance tooling. - Reviewed fixes for TLS CBC record validation, bounded HTTP/2 headers, GOAWAY
retry policy, response/hook cleanup, Cookie scope and request isolation, and
bodyless synchronous redirects. Async close also clears Python 3.7 socket
event registrations before the descriptor can be reused.
Compatibility and upgrade notes
- Python remains >=3.7; Brotli now requires >=1.2.0 for bounded decoding.
- Secure TLS defaults and the project-owned protocol implementation are unchanged.
HTTPRetry.raise_on_status=Truenow raises on final retryable status exhaustion
as configured; useFalseto return that response instead.- Streaming iteration is single-consumer and does not cache a replay copy. Close
responses when stopping early; an unread HTTP/1 response discards its connection. - Async decoding is strict and
.contentis cache-only. Async 307/308 redirects
retain method/body; synchronous redirects retain their existing GET policy. - Async file uploads, Cookie-file helpers, prepared-request APIs and module-level
convenience functions remain outside this first async scope. HTTP/3, 0-RTT,
ECH and post-quantum groups are not added.
See CHANGELOG,
async guide
and streaming guide.