Skip to content

Releases: encode/starlette

Version 0.23.0

05 Dec 12:35
035afb3
Compare
Choose a tag to compare

Added

  • Add headers parameter to the TestClient #1966.

Deprecated

  • Deprecate Starlette and Router decorators #1897.

Fixed

  • Fix bug on FloatConvertor regex #1973.

Version 0.22.0

17 Nov 06:27
549345e
Compare
Choose a tag to compare

Changed

  • Bypass GZipMiddleware when response includes Content-Encoding #1901.

Fixed

  • Remove unneeded unquote() from query parameters on the TestClient #1953.
  • Make sure MutableHeaders._list is actually a list #1917.
  • Import compatibility with the next version of AnyIO #1936.

Version 0.21.0

26 Sep 17:09
0b8a775
Compare
Choose a tag to compare

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 with httpx in TestClient #1376.

Added

  • Add WebSocketException and support for WebSocket exception handlers #1263.
  • Add middleware parameter to Mount class #1649.
  • Officially support Python 3.11 #1863.
  • Implement __repr__ for route classes #1864.

Fixed

  • Fix bug on which BackgroundTasks were cancelled when using BaseHTTPMiddleware and client disconnected #1715.

Version 0.20.4

28 Jun 12:08
0b132ee
Compare
Choose a tag to compare

Fixed

  • Remove converter from path when generating OpenAPI schema #1648.

Version 0.20.3

10 Jun 05:16
ccd486e
Compare
Choose a tag to compare

Fixed

  • Revert "Allow StaticFiles to follow symlinks" #1681.

Version 0.20.2

07 Jun 20:14
4519fba
Compare
Choose a tag to compare

Fixed

  • Fix regression on route paths with colons #1675.
  • Allow StaticFiles to follow symlinks #1337.

Version 0.20.1

28 May 07:58
d81545c
Compare
Choose a tag to compare

Fixed

  • Improve detection of async callables #1444.
  • Send 400 (Bad Request) when boundary is missing #1617.
  • Send 400 (Bad Request) when missing "name" field on Content-Disposition header #1643.
  • Do not send empty data to StreamingResponse on BaseHTTPMiddleware #1609.
  • Add __bool__ dunder for Secret #1625.

Version 0.20.0

03 May 05:33
830f348
Compare
Choose a tag to compare

Removed

Version 0.19.1

22 Apr 05:27
702fe81
Compare
Choose a tag to compare

Fixed

  • Fix inference of Route.name when created from methods #1553.
  • Avoid TypeError on websocket.disconnect when code is None #1574.

Deprecated

  • Deprecate WS_1004_NO_STATUS_RCVD and WS_1005_ABNORMAL_CLOSURE in favor of WS_1005_NO_STATUS_RCVD and WS_1006_ABNORMAL_CLOSURE, as the previous constants didn't match the WebSockets specs #1580.

Version 0.19.0

09 Mar 18:44
e086fc2
Compare
Choose a tag to compare

Added

  • Error handler will always run, even if the error happens on a background task #761.
  • Add headers parameter to HTTPException #1435.
  • Internal responses with 405 status code insert an Allow header, as described by RFC 7231 #1436.
  • The content argument in JSONResponse 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 to TestClient 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 of StreamingResponse and mounted applications #1459.
  • SessionMiddleware uses an explicit path=..., 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.

Deprecated

  • Deprecate WSGIMiddleware in favor of a2wsgi #1504.
  • Deprecate run_until_first_complete #1443.