1.8.0
Version 1.8.0
Added 1
- Add Request.send_early_hints() for HTTP 103 Early Hints through the ASGI http.response.early_hint extension
Changed 4
- Require Python 3.11 or later, dropping support for Python 3.10 requirement raised · inferred, marked in the notes below
- Exclude native gRPC media types (application/grpc and application/grpc+...) from GZipMiddleware compression by default behavior changed · inferred, marked in the notes below
- Send http.response.start immediately in GZipMiddleware for responses with an existing Content-Encoding, status 206, or an excluded content type, instead of waiting for the first body chunk
- Resolve the multipart charset once per request instead of once per field
Fixed 9
- Preserve response trailers through GZipMiddleware
- Stop FileResponse transfers when the client disconnects
- Stop multipart range responses when the file ends before a range is complete, instead of looping forever
- Ignore Range when If-Range contains a weak ETag
- Include Allow: GET, HEAD in StaticFiles 405 responses
- Close Request.stream() generators deterministically, avoiding "Exception ignored" errors with stacked BaseHTTPMiddleware
- Add Vary: Cookie when Session.pop() removes an existing key
- Emit Max-Age=0 on the session cookie when SessionMiddleware uses max_age=0
- Bracket IPv6 hostnames in URL.replace()
2 changes to check, marked in the notes below
From Starlette
This release adds HTTP 103 Early Hints, preserves response trailers through GZipMiddleware, and stops FileResponse transfers when clients disconnect. Starlette now requires Python 3.11.
Added
- Add
Request.send_early_hints()for HTTP 103 Early Hints through the ASGIhttp.response.early_hintextension #3435.
Changed
- Require Python 3.11 or later, dropping support for Python 3.10 #3592. requirement raised · inferred
- Exclude native gRPC media types (
application/grpcandapplication/grpc+...) fromGZipMiddlewarecompression by default #3565. behavior changed · inferred - Send
http.response.startimmediately inGZipMiddlewarefor responses with an existingContent-Encoding, status206, or an excluded content type, instead of waiting for the first body chunk #3631. - Resolve the multipart charset once per request instead of once per field #3618.
Fixed
- Preserve response trailers through
GZipMiddleware#3565. - Stop
FileResponsetransfers when the client disconnects #3523. - Stop multipart range responses when the file ends before a range is complete, instead of looping forever #3583.
- Ignore
RangewhenIf-Rangecontains a weak ETag #3567. - Include
Allow: GET, HEADinStaticFiles405responses #3640. - Close
Request.stream()generators deterministically, avoiding "Exception ignored" errors with stackedBaseHTTPMiddleware#3628. - Add
Vary: CookiewhenSession.pop()removes an existing key #3186. - Emit
Max-Age=0on the session cookie whenSessionMiddlewareusesmax_age=0#3651. - Bracket IPv6 hostnames in
URL.replace()#3617.
Full changelog: 1.7.0...1.8.0