Skip to content

Commit e8a65e4

Browse files
committed
v2.4.5
Signed-off-by: Janek Nouvertné <[email protected]>
1 parent 8153d5b commit e8a65e4

File tree

4 files changed

+48
-3
lines changed

4 files changed

+48
-3
lines changed

docs/release-notes/changelog.rst

+44
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,50 @@
33
2.x Changelog
44
=============
55

6+
.. changelog:: 2.4.5
7+
:date: 2023/12/23
8+
9+
.. change:: Fix validation of empty payload data with default values
10+
:type: bugfix
11+
:issue: 2902
12+
:pr: 2903
13+
14+
Prior to this fix, a handler like:
15+
16+
.. code-block:: python
17+
18+
@post(path="/", sync_to_thread=False)
19+
def test(data: str = "abc") -> dict:
20+
return {"foo": data}
21+
22+
``$ curl localhost:8000 -X POST``
23+
24+
would return a client error like:
25+
26+
.. code-block:: bash
27+
28+
{"status_code":400,"detail":"Validation failed for POST http://localhost:8000/","extra":[{"message":"Expected `str`, got `null`","key":"data","source":"body"}]}
29+
30+
.. change:: Support for returning ``Response[None]`` with a ``204`` status code from a handler
31+
:type: bugfix
32+
:pr: 2915
33+
:issue: 2914
34+
35+
Returning a ``Response[None]`` from a route handler for a response with a
36+
``204`` now works as expected without resulting in an
37+
:exc:`ImproperlyConfiguredException`
38+
39+
.. change:: Fix error message of ``get_logger_placeholder()``
40+
:type: bugfix
41+
:pr: 2919
42+
43+
Using a method on
44+
:attr:`Request.logger <litestar.connection.ASGIConnection.logger>` when not
45+
setting a ``logging_config`` on the application would result in a non-descriptive
46+
:exc:`TypeError`. An :exc:`ImproperlyConfiguredException` with an explanation is
47+
now raised instead.
48+
49+
650
.. changelog:: 2.4.4
751
:date: 2023/12/13
852

docs/topics/deployment/nginx-unit.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ For detailed understanding and further information, refer to the official
1414
`nginx-unit documentation <https://unit.nginx.org/>`_.
1515

1616
Alternatives
17-
~~~~~~~~~~~~
17+
++++++++++++
1818

1919
- :doc:`Manually with an ASGI server <manually-with-asgi-server>`:
2020
Direct control by running the application with an ASGI server like Uvicorn, Hypercorn, Daphne, etc.

docs/topics/deployment/supervisor.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ Suggestions
9393

9494
.. tip::
9595

96-
This follows onto the setup above, but provides some suggestions for making things easier to manage.
96+
This follows onto the setup above, but provides some suggestions for making things easier to manage.
97+
9798

9899
Aliases
99100
~~~~~~~

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ maintainers = [
5656
name = "litestar"
5757
readme = "README.md"
5858
requires-python = ">=3.8,<4.0"
59-
version = "2.4.4"
59+
version = "2.4.5"
6060

6161
[project.urls]
6262
Blog = "https://blog.litestar.dev"

0 commit comments

Comments
 (0)