v2.10.0
Highlights
π Performance and memory improvements
- Sending large HTTP/2 request bodies no longer copies the body quadratically - sending a 256 MiB body went from ~36s to under 0.1s (#1127).
- SSE parsing is up to 35x faster on highly fragmented streams (#1117).
- Cookie extraction is now skipped for responses without a
Set-Cookieheader, making typical requests roughly 8% faster (#1107).
πΈοΈ WebAssembly / Emscripten support
httpx2 now runs on Pyodide / Emscripten, using a JavaScript fetch-based transport defined in httpx2-jsfetch (#1119, #1114). Thanks @hoodmane!
httpx2
Added
- Add support for running on WebAssembly / Emscripten via Pyodide by @hoodmane in #1119
- Add
max_event_sizeto cap SSE event buffering by @Kludex in #1071 - Add RFC 9110 status code constants by @mbeijen in #1069
- Add support for Python 3.15 by @hugovk in #1090
Changed
- Improve SSE chunk buffering performance by @Kludex in #1117
- Skip cookie extraction without
Set-Cookieby @Kludex in #1107 - Return
str | Noneinstead ofAnyfromHeaders.getby @ItsDrike in #1121
Fixed
- Enforce WebSocket max message size across fragments by @Kludex in #1085
- Ignore unsolicited and duplicate Pong frames by @Kludex in #1122
httpcore2
Added
Changed
Fixed
- Propagate the original exception instead of raising
KeyErrorwhen an HTTP/2 stream fails by @yhay81 in #1093 - Start TLS for the
wssscheme in SOCKS5 proxy connections by @Kludex in #1104
π New Contributors
- @ccbest made their first contribution in #1096
- @dependabot[bot] made their first contribution in #1103
- @bagowix made their first contribution in #1111
- @aldbr made their first contribution in #1108
- @dsfaccini made their first contribution in #1110
- @yhay81 made their first contribution in #1093
- @laisbsc made their first contribution in #1092
- @hoodmane made their first contribution in #1114
- @ItsDrike made their first contribution in #1121
Full Changelog: v2.9.1...v2.10.0