diff --git a/docs/release-notes/changelog.rst b/docs/release-notes/changelog.rst index 3341034be0..b77ebed6ba 100644 --- a/docs/release-notes/changelog.rst +++ b/docs/release-notes/changelog.rst @@ -3,6 +3,36 @@ 2.x Changelog ============= +.. changelog:: 2.5.4 + :date: 2024-01-31 + + .. change:: Handle ``KeyError`` when `root_path` is not present in ASGI scope + :type: bugfix + :pr: 3051 + + Nginx Unit ASGI server does not set "root_path" in the ASGI scope, which is expected as part of the changes done in #3039. This PR fixes the assumption that the key is always present and instead tries to optionally retrieve it. + + + Issue originally reported over at [Discord](https://discord.com/channels/919193495116337154/919193495690936353/1202204676003745792) + + .. code-block:: + + KeyError on GET / + 'root_path' + + .. change:: ServerSentEvent typing error + :type: bugfix + :pr: 3048 + + fixes small typing error: + + .. code-block:: + + error: Argument 1 to "ServerSentEvent" has incompatible type "AsyncIterable[ServerSentEventMessage]"; expected "str | bytes | Iterable[str | bytes] | Iterator[str | bytes] | AsyncIterable[str | bytes] | AsyncIterator[str | bytes]" [arg-type] + + inside ``test_sse`` there was a ``Any`` I changed to trigger the test then solved it. + + .. changelog:: 2.5.3 :date: 2024/01/29 diff --git a/pyproject.toml b/pyproject.toml index d30138fd4f..e7e0f87451 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ maintainers = [ name = "litestar" readme = "README.md" requires-python = ">=3.8,<4.0" -version = "2.5.3" +version = "2.5.4" [project.urls] Blog = "https://blog.litestar.dev"