HyperHTTP 2.0.0
·
0 commits
to continuous-dev
since this release
Added
- Custom zero-copy
asyncio.Protocol(FastStream) for the HTTP/1.1 hot path,
bypassingasyncio.StreamReaderand removing intermediate buffer copies. - HTTP/2 connection probing that serializes the first TLS handshake per host so
concurrent requests multiplex onto a single H2 connection instead of racing to
open several. - Optional speed extras:
orjson,uvloop,h11,brotli,zstandard
(installable viapip install 'hyperhttp[speed]'). - Streaming response API (
aiter_bytes,aiter_lines,aread) with strict
Content-Lengthvalidation. - DNS cache with Happy Eyeballs-style dual-stack connect.
- Integration test suite covering HTTP/1.1, HTTP/2, TLS, redirects, framing
edge cases, retries, and circuit breaker behavior.
Changed
- Breaking: full rewrite of the client, connection pool, HTTP/1 parser,
buffer pool, and H2 multiplexer. Public API surface is smaller and
intentionally incompatible with 1.x. Response.areadnow collects raw chunks and joins once withb"".join,
halving memcpy work for identity-encoded bodies with a known length.- Socket tuning:
SO_RCVBUF=2 MiB,SO_SNDBUF=1 MiB,TCP_NODELAY,
SO_KEEPALIVEenabled by default. - Error classifier rewritten to map hyperhttp's own exception hierarchy to
retry / circuit-breaker categories.
Removed
- Breaking: legacy connection manager, old HTTP/1 and HTTP/2 protocol
modules, and the pre-2.0 test suite. setup.py(packaging driven entirely bypyproject.toml).
Fixed
- HTTP/1.1 framing: reject responses with conflicting Content-Length and
Transfer-Encoding, or multiple Content-Length headers. - Body truncation now raises
RemoteProtocolErrorinstead of returning a
short body silently.