Highlights
🌐 CIDR ranges in NO_PROXY
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 IPv6 addresses like [::1]:8080 are accepted, and unparseable NO_PROXY entries are ignored instead of failing client creation (#1267).
🔐 FIPS-enforced Python support
httpx2 now imports on FIPS-enforced Python builds without hashlib.md5. DigestAuth raises ProtocolError only when the server asks for an unavailable algorithm (#1130).
🔌 Sturdier connections and WebSocket shutdown
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).
httpx2
Added
- Match IP CIDR ranges, like
192.168.0.0/16and[fe80::]/10, inNO_PROXYandmounts. Requests to any address in the range now bypass the proxy; previously only the network address itself did (#1165). - Accept bracketed IPv6 addresses, like
[::1]and[::1]:8080, inNO_PROXY(#1267).
Changed
- Raise
InvalidURLfor amountskey with an IP host followed by anything other than a valid CIDR prefix, likeall://10.0.0.0/33(#1165).
Fixed
- Ignore
NO_PROXYentries that cannot be parsed, instead of raisingInvalidURLwhen the client is created (#1267). - Import
httpx2on FIPS-enforced Python builds withouthashlib.md5.DigestAuthraisesProtocolErrorwhen the server asks for an unavailable algorithm (#1130). - Handle reads after an ASGI WebSocket app shuts down, instead of leaking
anyioexceptions (#1233). - Stop the sync WebSocket session from hanging on exit when its event queue is full (#1123).
httpcore2
Fixed
- Keep
CONNECTand absolute-form proxy targets when the request sets thetargetextension (#1262). - Stop blocking reads when an HTTP/2 server lowers
SETTINGS_MAX_CONCURRENT_STREAMSwhile requests are in flight (#1217). - Raise
WriteErrorinstead ofanyio.EndOfStreamwhen writing after the peer closes a TLS connection withoutclose_notify(#1263).
Full Changelog: v2.13.1...v2.14.0