Skip to content

Releases: encode/starlette

Version 0.33.0

01 Dec 13:39
bf2d4e1
Compare
Choose a tag to compare

Added

  • Add middleware per Route/WebSocketRoute #2349.
  • Add middleware per Router #2351.

Fixed

  • Do not overwrite "path" and "root_path" scope keys #2352.
  • Set ensure_ascii=False on json.dumps() for WebSocket.send_json() #2341.

Version 0.32.0.post1

06 Nov 06:29
2c066af
Compare
Choose a tag to compare

Fixed

  • Revert mkdocs-material from 9.1.17 to 9.4.7 #2326.

Version 0.32.0

04 Nov 12:16
aa6caf9
Compare
Choose a tag to compare

Added

  • Send reason on WebSocketDisconnect #2309.
  • Add domain parameter to SessionMiddleware #2280.

Changed

  • Inherit from HTMLResponse instead of Response on _TemplateResponse #2274.
  • Restore the Response.render type annotation to its pre-0.31.0 state #2264.

Full Changelog: 0.31.1...0.32.0

Version 0.31.1

26 Aug 16:42
b33790f
Compare
Choose a tag to compare

Fixed

  • Fix import error when exceptiongroup isn't available #2231.
  • Set url_for global for custom Jinja environments #2230.

Full Changelog: 0.31.0...0.31.1

Version 0.31.0

24 Jul 15:47
a8b8856
Compare
Choose a tag to compare

Added

  • Officially support Python 3.12 #2214.
  • Support AnyIO 4.0 #2211.
  • Strictly type annotate Starlette (strict mode on mypy) #2180.

Fixed

  • Don't group duplicated headers on a single string when using the TestClient #2219.

Full Changelog: 0.30.0...0.31.0

Version 0.30.0

13 Jul 11:31
b9465e9
Compare
Choose a tag to compare

Removed

  • Drop Python 3.7 support #2178.

Version 0.29.0

13 Jul 08:12
12d9659
Compare
Choose a tag to compare

Added

  • Add follow_redirects parameter to TestClient #2207.
  • Add __str__ to HTTPException and WebSocketException #2181.
  • Warn users when using lifespan together with on_startup/on_shutdown #2193.
  • Collect routes from Host to generate the OpenAPI schema #2183.
  • Add request argument to TemplateResponse #2191.

Fixed

  • Stop body_stream in case more_body=False on BaseHTTPMiddleware #2194.

Full Changelog: 0.28.0...0.29.0

Version 0.28.0

07 Jun 06:26
da7adf2
Compare
Choose a tag to compare

Changed

  • Reuse Request's body buffer for call_next in BaseHTTPMiddleware #1692.
  • Move exception handling logic to Route #2026.

Added

  • Add env parameter to Jinja2Templates, and deprecate **env_options #2159.
  • Add clear error message when httpx is not installed #2177.

Fixed

  • Allow "name" argument on templates url_for() #2127.

Full Changelog: 0.27.0...0.28.0

Version 0.27.0

16 May 10:57
0c4b68a
Compare
Choose a tag to compare

This release fixes a path traversal vulnerability in StaticFiles. You can view the full security advisory:
GHSA-v5gw-mw7f-84px

Added

  • Minify JSON websocket data via send_json #2128

Fixed

  • Replace commonprefix by commonpath on StaticFiles 1797de4.
  • Convert ImportErrors into ModuleNotFoundError #2135.
  • Correct the RuntimeError message content in websockets #2141.

Full Changelog: 0.26.1...0.27.0

Version 0.26.1

13 Mar 18:08
8965f88
Compare
Choose a tag to compare

Fixed

  • Fix typing of Lifespan to allow subclasses of Starlette #2077.