Skip to content

Releases: encode/starlette

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.

Version 0.26.0.post1

09 Mar 23:56
796b2f7
Compare
Choose a tag to compare

Fixed

  • Replace reference from Events to Lifespan on the mkdocs.yml #2072.

Version 0.26.0

09 Mar 23:09
a5b0088
Compare
Choose a tag to compare

Added

Changed

  • Change url_for signature to return a URL instance #1385.

Fixed

  • Allow "name" argument on url_for() and url_path_for() #2050.

Deprecated

  • Deprecate on_startup and on_shutdown events #2070.

Full Changelog: 0.25.0...0.26.0

Version 0.25.0

14 Feb 09:06
fc48089
Compare
Choose a tag to compare

Fixed

  • Limit the number of fields and files when parsing multipart/form-data on the MultipartParser 8c74c2c and #2036.

Version 0.24.0

06 Feb 16:01
218a6b4
Compare
Choose a tag to compare

Added

  • Allow StaticFiles to follow symlinks #1683.
  • Allow Request.form() as a context manager #1903.
  • Add size attribute to UploadFile #1405.
  • Add env_prefix argument to Config #1990.
  • Add template context processors #1904.
  • Support str and datetime on expires parameter on the Response.set_cookie method #1908.

Changed

  • Lazily build the middleware stack #2017.
  • Make the file argument required on UploadFile #1413.
  • Use debug extension instead of custom response template extension #1991.

Fixed

  • Fix url parsing of ipv6 urls on URL.replace #1965.