🌐 Opt-in HTTP/2 support
uvicorn 0.53.0 adds experimental HTTP/2 through zttp, alongside a new zuvloop integration and connection-handling improvements.
uv add uvicorn==0.53.0- Serve HTTP/1.1 and HTTP/2 with
zttp(#2982, #3101). Installzttp, then enable HTTP/2 with--http zttp --http2. Uvicorn negotiates HTTP/2 over TLS with ALPN and supports cleartext prior knowledge. - HTTP/2 remains experimental. Upgrade-based h2c and WebSockets over HTTP/2 are not supported.
⚙️ More event loop choice
- Run Uvicorn with
zuvloop(#3104). Installzuvloopseparately and select it explicitly with--loop zuvloopon CPython 3.14 or newer.
🛡️ More reliable connections and proxies
- Honor
Connection: closetoken lists (#3103). Uvicorn now parses comma-separated tokens case-insensitively across HTTP implementations. - Trust IPv6 loopback proxies by default (#3119). The default
FORWARDED_ALLOW_IPSvalue now includes::1. - Keep upgraded WebSockets alive (#3107). Uvicorn cancels the HTTP keep-alive timer when the connection becomes a WebSocket.
Full changelog: 0.52.4...0.53.0