NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #100 most downloaded on PyPI
A minimal low-level HTTP client.
Latest stable
2.16.2
Last release 6 days ago
16 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 22 of 23 stable releases
Nothing withdrawn
no release was ever pulled
6 months old
24 releases · first in 2026
Drag across the ruler to compare, or tap a release to open it.
🩹 Type aliases evaluate at runtime again
httpx2 and httpcore2 2.16.2 are a patch release with one fix. You will notice it if your code, or a library you depend on, uses the aliases in httpx2._types inside a runtime typing construct. On 2.16.1, import mistralai.client failed on Python 3.11 to 3.13.
pip install --upgrade httpx2==2.16.2Optional[QueryParamTypes] and QueryParamTypes | None work again (#1346). In 2.16.1 URLTypes, QueryParamTypes, HeaderTypes, CookieTypes, TimeoutTypes, ProxyTypes and AuthTypes were strings. Optional[...] raised SyntaxError for QueryParamTypes and HeaderTypes, and | None raised TypeError for all seven. They are Union[...] objects again, as in 2.16.0.httpcore2 has no changes. It is bumped to stay in lockstep with httpx2.
Full changelog: v2.16.1...v2.16.2
No changes since 2.16.1. Version bumped to stay in lockstep with httpx2.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
One column per month.
🚦 Concurrent HTTP/2 uploads no longer stall
httpx2 and httpcore2 2.16.1 are a patch release. Every change is a fix. You will notice it most if you run several HTTP/2 uploads over one connection, where requests could hang until the read timeout.
pip install --upgrade httpx2==2.16.1WINDOW_UPDATE that another task had already read, then block on a read the server had nothing to answer. httpcore2 now rechecks the window after acquiring the read lock.Host header raises LocalProtocolError (#1319). An HTTP/2 request sent directly to an httpcore2 connection without Host raised IndexError before.Location returns the response when redirects are not followed (#1064). httpx2 raised RemoteProtocolError and discarded the response. You now get the response with its headers, and response.next_request is None.*.example.com in NO_PROXY matches subdomains (#1277). The entry never matched before, so those requests still went through the proxy. It now behaves like .example.com.Digest Realm="r", Nonce="n" raised ProtocolError before. Whitespace around = is allowed too.uv publish uploads it. Releases since the move to uv publish had no provenance on PyPI.Full changelog: v2.16.0...v2.16.1
LocalProtocolError instead of IndexError when an HTTP/2 request sent directly to a connection has no Host header.
(#1319)🍪 Faster requests with large cookie jars
Building the Cookie header no longer scans every cookie in the jar. The client reuses its jar instead of copying it on every request and redirect (#1284), only looks up the domains that can match the request host, and skips the expired cookie sweep until a cookie is due (#1285). With 1,000 cookies across 500 domains, building the Cookie header is about 18 times faster.
Cookies from different domains are now sent from the least to the most specific domain, for example .example.org before sub.example.org, instead of in the order the domains were added. Cookies with longer paths still come first.
Cookie header is about 18 times faster. Cookies from different domains are now sent from the least to the most specific domain (#1285).client.cookies.jar.set_policy() now applies to outgoing requests (#1284).No changes since 2.15.1. Version bumped to stay in lockstep with httpx2.
Full Changelog: v2.15.1...v2.16.0
🔒 Flat CPU usage for long-lived clients on Linux
On Linux, the default SSL context is now configured once instead of on every handshake (#1253). With OpenSSL older than 3.4, each handshake added a duplicate certificate lookup path, so CPU usage per request grew over the lifetime of a reused client. Certificate verification is unchanged, and Windows and macOS still use truststore.
Full Changelog: v2.15.0...v2.15.1
httpx2 and httpcore2 no longer support Python 3.10 ( #1274 ). There are no other changes in this release.
httpx2 and httpcore2 no longer support Python 3.10 (#1274). There are no other changes in this release.
Full Changelog: v2.14.0...v2.15.0
NO_PROXY and mounts now match IP CIDR ranges like 192.168.0.0/16 and [fe80::]/10 , so any address in the range bypasses the proxy ( #1165 ). Bracketed
NO_PROXYNO_PROXY and mounts now match IP CIDR ranges like 192.168.0.0/16 and [fe80::]/10, so any address in the range bypasses the proxy (#1165). Bracketed IPv6 addresses like [::1]:8080 are accepted, and unparseable NO_PROXY entries are ignored instead of failing client creation (#1267).
httpx2 now imports on FIPS-enforced Python builds without hashlib.md5. DigestAuth raises ProtocolError only when the server asks for an unavailable algorithm (#1130).
HTTP/2 reads no longer block when a server lowers SETTINGS_MAX_CONCURRENT_STREAMS mid-flight (#1217), and writing after a peer closes TLS without close_notify raises WriteError (#1263). Sync WebSocket sessions no longer hang on exit with a full event queue (#1123), and ASGI WebSocket reads after app shutdown no longer leak anyio exceptions (#1233).
192.168.0.0/16 and [fe80::]/10, in NO_PROXY and mounts. Requests to any address in the range now bypass the proxy; previously only the network address itself did (#1165).[::1] and [::1]:8080, in NO_PROXY (#1267).InvalidURL for a mounts key with an IP host followed by anything other than a valid CIDR prefix, like all://10.0.0.0/33 (#1165).NO_PROXY entries that cannot be parsed, instead of raising InvalidURL when the client is created (#1267).httpx2 on FIPS-enforced Python builds without hashlib.md5. DigestAuth raises ProtocolError when the server asks for an unavailable algorithm (#1130).anyio exceptions (#1233).CONNECT and absolute-form proxy targets when the request sets the target extension (#1262).SETTINGS_MAX_CONCURRENT_STREAMS while requests are in flight (#1217).WriteError instead of anyio.EndOfStream when writing after the peer closes a TLS connection without close_notify (#1263).Full Changelog: v2.13.1...v2.14.0
Passing a file as content= now calculates Content-Length from its remaining bytes, respecting the current file position ( #1214 ).
Passing a file as content= now calculates Content-Length from its remaining bytes, respecting the current file position (#1214).
TLS hostname overrides now apply inside HTTP proxy tunnels without affecting the proxy's own TLS connection (#1223). HTTP/2 is advertised first when enabled, and HTTP/1.1 is omitted when disabled (#1155).
The sync WebSocket keepalive thread now exits cleanly when a ping races with connection shutdown (#1228).
Content-Length from the remaining bytes when a file is passed as content=, respecting its current position (#1214).sni_hostname extension for TLS inside HTTP proxy tunnels without applying it to the proxy's TLS connection (#1223).Full Changelog: v2.13.0...v2.13.1
🔐 Reliable TLS verification controls
The CLI --no-verify flag now disables TLS certificate verification as intended, and --verify provides an explicit counterpart (#1140, #1186).
Stopping a streamed response early no longer risks a nested async generator finalization error (#1204).
brotlicffi 1.2.0.2 or later for the brotli extra on non-CPython implementations in #1179--no-verify CLI flag disable TLS certificate verification and add an explicit --verify counterpart in #1140 and #1186trio extra in #1179Full Changelog: v2.12.0...v2.13.0
trio extra.
(#1179)🛡️ Bounded response decompression
httpx2 now decodes gzip, deflate, Brotli, and Zstandard responses incrementally. Each decode step emits at most 1 MiB, so streaming a highly compressed response no longer requires materializing an entire inflated network chunk in memory (#1126).
Python 3.13 and earlier now use backports.zstd, which provides the same bounded incremental decompression API as compression.zstd on Python 3.14 and later (#1146).
No changes since 2.11.0. Version bumped to stay in lockstep with httpx2.
Full Changelog: v2.11.0...v2.12.0
Deprecated status code aliases are available again ( #1135 ).
httpx2 now includes an immutable and hashable Origin value object, available through URL.origin. It provides normalized scheme, host, and effective port comparisons without including URL paths, queries, fragments, or credentials (#1134).
Transfer-Encoding headers now take precedence over body-derived Content-Length headers (#1137).Transfer-Encoding headers and expose buffered request body lengths to WSGI applications by @Kludex in #1137Full Changelog: v2.10.0...v2.11.0
🚀 Performance and memory improvements
Set-Cookie header, making typical requests roughly 8% faster (#1107).httpx2 now runs on Pyodide / Emscripten, using a JavaScript fetch-based transport defined in httpx2-jsfetch (#1119, #1114). Thanks @hoodmane!
max_event_size to cap SSE event buffering by @Kludex in #1071Set-Cookie by @Kludex in #1107str | None instead of Any from Headers.get by @ItsDrike in #1121KeyError when an HTTP/2 stream fails by @yhay81 in #1093wss scheme in SOCKS5 proxy connections by @Kludex in #1104Full Changelog: v2.9.1...v2.10.0
Alias httpcore imports to httpcore2 in alias_httpx() by @Kludex in https://github.com/pydantic/httpx2/pull/1082
httpcore imports to httpcore2 in alias_httpx() by @Kludex in https://github.com/pydantic/httpx2/pull/1082Full Changelog: https://github.com/pydantic/httpx2/compare/v2.9.0...v2.9.1
No changes since 2.9.0. Version bumped to stay in lockstep with httpx2.
Add alias_httpx() to alias httpx imports to httpx2 by @Kludex in https://github.com/pydantic/httpx2/pull/1077
alias_httpx() to alias httpx imports to httpx2 by @Kludex in https://github.com/pydantic/httpx2/pull/1077Full Changelog: https://github.com/pydantic/httpx2/compare/v2.8.0...v2.9.0
No changes since 2.8.0. Version bumped to stay in lockstep with httpx2.
Eliminate multi-assignment churn in the connection pool by @Kludex in https://github.com/pydantic/httpx2/pull/1075
Full Changelog: https://github.com/pydantic/httpx2/compare/v2.7.0...v2.8.0
This release syncs the vendored WebSocket support with the latest httpx-ws, which was previously pinned to an outdated snapshot.
This release syncs the vendored WebSocket support with the latest httpx-ws, which was previously pinned to an outdated snapshot.
Full Changelog: https://github.com/pydantic/httpx2/compare/v2.6.0...v2.7.0
No changes since 2.6.0. Version bumped to stay in lockstep with httpx2.
The main feature in this release is support for WebSockets! 🎉
The main feature in this release is support for WebSockets! 🎉
from httpx2 import AsyncClient
async with httpx2.AsyncClient() as client:
async with client.websocket("ws://localhost:8000/ws") as ws:
await ws.send_text("Hello!")
message = await ws.receive_text()
Full Changelog: https://github.com/pydantic/httpx2/compare/v2.5.0...v2.6.0
Allow IPv6 CIDR notation in no_proxy by @mbeijen in https://github.com/pydantic/httpx2/pull/967
no_proxy by @mbeijen in https://github.com/pydantic/httpx2/pull/967client.sse() by @Kludex in https://github.com/pydantic/httpx2/pull/1046| and |= operators for Headers by @Kludex in https://github.com/pydantic/httpx2/pull/1047Headers union operator by @Kludex in https://github.com/pydantic/httpx2/pull/1049Full Changelog: https://github.com/pydantic/httpx2/compare/v2.4.0...v2.5.0
Use a custom deprecation warning visible by default by @Kludex in https://github.com/pydantic/httpx2/pull/1029
Full Changelog: https://github.com/pydantic/httpx2/compare/v2.3.0...v2.4.0
Allow default_encoding callable to return None by @Kludex in https://github.com/pydantic/httpx2/pull/951
default_encoding callable to return None by @Kludex in https://github.com/pydantic/httpx2/pull/951certifi to truststore for default SSL verification by @Kludex in https://github.com/pydantic/httpx2/pull/209httpcore2 from certifi to truststore for default SSL verification by @Kludex in https://github.com/pydantic/httpx2/pull/1002_assign_requests_to_connections as a single-pass loop by @mbeijen in https://github.com/pydantic/httpx2/pull/974Full Changelog: https://github.com/pydantic/httpx2/compare/v2.2.0...v2.3.0
Handle multi-frame zstd streams split across chunks by @mbeijen in https://github.com/pydantic/httpx2/pull/946
Full Changelog: https://github.com/pydantic/httpx2/compare/v2.1.0...v2.2.0
No changes since 2.1.0. Version bumped to stay in lockstep with httpx2.
Drop Python 3.9 support, add Python 3.14 by @Kludex in https://github.com/pydantic/httpx2/pull/208
compression.zstd for Zstd decompression on Python 3.14+ by @Kludex in https://github.com/pydantic/httpx2/pull/932Full Changelog: https://github.com/pydantic/httpx2/compare/v2.0.0...v2.1.0
SETTINGS frame drives a stream's send window negative, instead of letting h2 raise LocalProtocolError. (#935)This is fully compatible with latest httpx.
First official release!
This is fully compatible with latest httpx.
Official first release of httpcore2. No changes since 2.0.0b1.
First release of httpcore2, a fork of `httpcore` maintained by Pydantic. Forked from httpcore 1.0.9.
First release of httpcore2, a fork of httpcore maintained by Pydantic. Forked from httpcore 1.0.9.
httpcore -> httpcore2. import httpcore becomes import httpcore2. No other public API changed.max_keepalive_connections not being properly handled. (Inherited from upstream PR encode/httpcore#1000.)Historical entries below are from upstream encode/httpcore.
Nothing published for this version