Skip to content

Commit

Permalink
resolve some conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
provinzkraut committed Dec 13, 2024
1 parent 36fb48d commit ec373ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/release-notes/2.x-changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@

Static file serving has been implemented with regular route handlers instead of
a specialised ASGI app. At the moment, this is complementary to the usage of
``litestar.static_files.StaticFilesConfig`` to maintain backwards
`litestar.static_files.StaticFilesConfig`` to maintain backwards
compatibility.

This achieves a few things:
Expand Down
24 changes: 1 addition & 23 deletions docs/release-notes/whats-new-3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,10 @@ Imports
+====================================================+========================================================================+
| **SECTION** |
+----------------------------------------------------+------------------------------------------------------------------------+
+ Put your shit here from v2 | Put your shit here from v3 |
| Put your shit here from v2 | Put your shit here from v3 |
+----------------------------------------------------+------------------------------------------------------------------------+



Removal of ``StaticFileConfig``
-------------------------------

The ``StaticFilesConfig`` has been removed, alongside these related parameters and
functions:

- ``Litestar.static_files_config``
- ``Litestar.url_for_static_asset``
- ``Request.url_for_static_asset``

:func:`create_static_files_router` is a drop-in replacement for ``StaticFilesConfig``,
and can simply be added to the ``route_handlers`` like any other regular handler.

Usage of ``url_for_static_assets`` should be replaced with a ``url_for("static", ...)``
call.


Other Changes
-------------
Removal of ``StaticFileConfig``
-------------------------------

Expand Down Expand Up @@ -112,7 +92,6 @@ The ``OpenAPIConfig.enabled_endpoints`` attribute is no longer available in vers
enabled a set of endpoints that would serve different OpenAPI UIs. In the new version, only the ``openapi.json``
endpoint is enabled by default, alongside the ``Scalar`` UI plugin as the default.

Make more sections as they are appropriate :)
To adapt to this change, you should explicitly configure any additional endpoints you need by properly setting up the
necessary plugins within the :attr:`OpenAPIConfig.render_plugins` parameter.

Expand All @@ -139,7 +118,6 @@ replace the usages of ``app`` with ``request.app``.
Deprecated scope state utilities removed
----------------------------------------

Make more sections as they are appropriate :)
Litestar has previously made available utilities for storing and retrieving data in the ASGI scope state. These
utilities have been removed in version 3.0.0. If you need to store data in the ASGI scope state, you should use do so
using a namespace that is unique to your application and unlikely to conflict with other applications.
Expand Down

0 comments on commit ec373ad

Please sign in to comment.