Releases: encode/starlette
Releases Β· encode/starlette
Version 0.23.0
Version 0.22.0
Version 0.21.0
This release replaces the underlying HTTP client used on the TestClient
(requests
β‘οΈ httpx
), and as those clients differ a bit on their API, your test suite will likely break. To make the migration smoother, you can use the bump-testclient
tool.
Changed
- Replace
requests
withhttpx
inTestClient
#1376.
Added
- Add
WebSocketException
and support for WebSocket exception handlers #1263. - Add
middleware
parameter toMount
class #1649. - Officially support Python 3.11 #1863.
- Implement
__repr__
for route classes #1864.
Fixed
- Fix bug on which
BackgroundTasks
were cancelled when usingBaseHTTPMiddleware
and client disconnected #1715.
Version 0.20.4
Fixed
- Remove converter from path when generating OpenAPI schema #1648.
Version 0.20.3
Fixed
- Revert "Allow
StaticFiles
to follow symlinks" #1681.
Version 0.20.2
Version 0.20.1
Fixed
Version 0.20.0
Version 0.19.1
Fixed
- Fix inference of
Route.name
when created from methods #1553. - Avoid
TypeError
onwebsocket.disconnect
when code isNone
#1574.
Deprecated
- Deprecate
WS_1004_NO_STATUS_RCVD
andWS_1005_ABNORMAL_CLOSURE
in favor ofWS_1005_NO_STATUS_RCVD
andWS_1006_ABNORMAL_CLOSURE
, as the previous constants didn't match the WebSockets specs #1580.
Version 0.19.0
Added
- Error handler will always run, even if the error happens on a background task #761.
- Add
headers
parameter toHTTPException
#1435. - Internal responses with
405
status code insert anAllow
header, as described by RFC 7231 #1436. - The
content
argument inJSONResponse
is now required #1431. - Add custom URL convertor register #1437.
- Add content disposition type parameter to
FileResponse
#1266. - Add next query param with original request URL in requires decorator #920.
- Add
raw_path
toTestClient
scope #1445. - Add union operators to
MutableHeaders
#1240. - Display missing route details on debug page #1363.
- Change
anyio
required version range to>=3.4.0,<5.0
#1421 and #1460. - Add
typing-extensions>=3.10
requirement - used only on lower versions than Python 3.10 #1475.
Fixed
- Prevent
BaseHTTPMiddleware
from hiding errors ofStreamingResponse
and mounted applications #1459. SessionMiddleware
uses an explicitpath=...
, instead of defaulting to the ASGI 'root_path' #1512.Request.client
is now compliant with the ASGI specifications #1462.- Raise
KeyError
at early stage for missing boundary #1349.