Releases: litestar-org/litestar
v2.16.0
Sponsors 🌟
Thanks to these incredible business sponsors:
- Scalar (@scalar), Telemetry Sports (via @chris-telemetry)
Thanks to these incredible personal sponsors:
- Polar.sh: @Nozavi, @cemrehancavdar, @thomastu
- GitHub Sponsors: @roboflow, @benjamin-kirkbride, @ddahan, @cbscsm
- OpenCollective: Christian Y
What's changed
Bugfixes 🐛
- fix: update Makefile to include install in output by @adhtruong in #4079
- fix(typing): Remove usage of private
_AnnotatedAlias
by @provinzkraut in #4126 - fix(DI): Ensure dependencies are cleaned up when exception occurrs during cleanup by @provinzkraut in #4148
- fix: misleading error message upon ImportError with --app argument to CLI by @cstarkers in #4152
- fix(testing): subprocess client raises exc when fails to start by @mmev in #4153
- fix(openapi): support prefixItems for tuple schema by @Jannchie in #4132
- fix(cli): pre parse launch arguments when cli command executed by @mmev in #4161
New features 🚀
- feat(log): disable stack trace by @Harshal6927 in #4086
- feat(openapi): add custom example ids support by @Jannchie in #4133
- feat: add self to validate_handler_fn error message by @thewisenerd in #4157
- feat(DTO): Populate
linecache
for generated transfer functions by @provinzkraut in #4159 - feat(DTO): Add custom attribute accessor callable by @provinzkraut in #4160
- feat: add scalar configuration by @skv0zsneg in #4162
Other changes
- refactor: use typos by @adhtruong in #4080
- docs: add example for cache_response_filter by @euri10 in #4096
- docs: add usage of server_lifespan hook and motivations by @euri10 in #4097
- docs: add mention in guard docs from where connection.user comes from by @euri10 in #4101
- docs: rework custom authentication middleware by @euri10 in #4095
- docs: Replace contrib with plugins in example code by @eandersons in #4094
- docs: 📚 Fix return value for UploadFile by @Sube-py in #4120
- docs: clarify WebSocket
send_websocket_stream
capabilities by @provinzkraut in #4124 - docs: add test to stream_and_receive_listener and mention on json default by @euri10 in #4108
- docs(CLI): Make CLI docs about app discovery more coherent by @provinzkraut in #4139
- docs: show exceptions raised aren't always JSON by @euri10 in #4128
- docs: test most requests.rst literalinclude by @euri10 in #4099
- docs: Some readme updates by @provinzkraut in #4138
- docs: fixed variable name in ASGIMiddleware code example by @mmev in #4151
New contributors 🎉
- @mmev made their first contribution in #4151
- @Jannchie made their first contribution in #4132
- @thewisenerd made their first contribution in #4157
- @skv0zsneg made their first contribution in #4162
- @cstarkers made their first contribution in #4152
- @Sube-py made their first contribution in #4120
Full Changelog
v2.15.2...v2.16.0
v2.15.2
Sponsors 🌟
Thanks to these incredible business sponsors:
- Scalar (@scalar), Telemetry Sports (via @chris-telemetry)
Thanks to these incredible personal sponsors:
- Polar.sh: @Nozavi, @cemrehancavdar, @thomastu
- GitHub Sponsors: @roboflow, @benjamin-kirkbride, @ddahan, @cbscsm
- OpenCollective: Christian Y
What's changed
New contributors 🎉
- @farmio made their first contribution in #4067
- @nisemenov made their first contribution in #4049
- @saska made their first contribution in #4015
Bugfixes 🐛
- fix: check for default headers before appending to cors header failures by @saska in #4015
- fix(events): ensure callable metadata is replicated by @Harshal6927 in #4045
- fix: explicit specification of arguments in FileSystemAdapter open func. by @nisemenov in #4049
- fix(typing): Correctly handle
typing_extensions.TypeAliasType
ontyping-extensions>4.13.0
(fix #4088) by @provinzkraut in #4089
Full Changelog
v2.15.1...v2.15.2
v2.15.1
Sponsors 🌟
Thanks to these incredible business sponsors:
- Scalar (@scalar), Telemetry Sports (via @chris-telemetry)
Thanks to these incredible personal sponsors:
-
GitHub Sponsors: @roboflow, @benjamin-kirkbride, @ddahan, @cbscsm
-
OpenCollective: Christian Y
-
A huge 'Thank you!' to all sponsors across Polar.sh, OpenCollective and GitHub Sponsors!
New contributors 🎉
- @eandersons made their first contribution in #4032
Bugfixes 🐛
- fix: Warn about using streaming responses with a
body
by @provinzkraut in #4033 - fix: Fix #4035 - incorrect deprecation warning issued when subclassing middlewares by @provinzkraut in #4036
Other changes
- docs: Use "click to toggle" instead of "click to expand" by @eandersons in #4032
Full Changelog
v2.15.0...v2.15.1
v2.15.0
Sponsors 🌟
Thanks to these incredible business sponsors:
- Scalar (@scalar), Telemetry Sports (via @chris-telemetry)
Thanks to these incredible personal sponsors:
-
GitHub Sponsors: @roboflow, @benjamin-kirkbride, @ddahan, @cbscsm
-
OpenCollective: Christian Y
-
A huge 'Thank you!' to all sponsors across Polar.sh, OpenCollective and GitHub Sponsors!
What's changed
New contributors 🎉
- @iyad-f made their first contribution in #3935
- @pech2 made their first contribution in #3994
- @Ada-lave made their first contribution in #3988
- @YorkSu made their first contribution in #3970
- @sloria made their first contribution in #3953
- @tofran made their first contribution in #4017
- @oek1ng made their first contribution in #3960
Bugfixes 🐛
- fix(ASGI mounts): Prevent accidental scope overrides by mounted ASGI apps by @provinzkraut in #3945
- fix: corrected import of attrs by @euri10 in #3947
New features 🚀
- feat(jwt): Added revoked token handler support by @oek1ng in #3960
- feat: allow
route_reverse
params of typeuuid
to be passed asstr
by @aedify-swi in #3972 - feat(CLI): Make better error message for invalid
--app
string by @RenameMe1 in #3977 - feat(DTOs): Support
@property
fields for msgspec and dataclass by @provinzkraut in #3981 - feat(core): new base middleware by @provinzkraut in #3996
- feat: Add
SerializationPlugin
andInitPlugin
to replace their respective protocols by @provinzkraut in #4025 - feat(debugger): passing debugger to app by @oek1ng in #3967
Full Changelog
v2.14.0...v2.15.0
v2.14.0
Summary
We are pleased to publish our first release of 2025!
Since our last release in November, everyone's been busy. In that short time, we've managed to squeeze in a huge amount of fixes, features, and (most, importantly) Python 3.13 support. Thank you to everyone in the community who contributed to this.
As we move towards 3.0, you'll see a few deprecations being added to packages. Please don't hesitate to join our discord to discuss any deprecation specifics or any other change you'd like to see in 3.0
Sponsors 🌟
Thanks to these incredible business sponsors:
- Scalar (@scalar), Telemetry Sports (via @chris-telemetry)
Thanks to these incredible personal sponsors:
-
GitHub Sponsors: @roboflow, @benjamin-kirkbride, @ddahan, @cbscsm
-
OpenCollective: Christian Y
-
A huge 'Thank you!' to all sponsors across Polar.sh, OpenCollective and GitHub Sponsors!
What's changed
New contributors 🎉
- @ftsartek made their first contribution in #3892
- @adhtruong made their first contribution in #3880
- @wallseat made their first contribution in #3525
- @250MHz made their first contribution in #3920
- @vikigenius made their first contribution in #3876
Bugfixes 🐛
- fix: remove optional group for
litestar-htmx
by @cofin in #3870 - fix(pydantic): Add moved URL types to type map by @provinzkraut in #3874
- fix: patching of otel middleware to work with subclasses by @vikigenius in #3876
- fix(ci): Pin PDM version for 3.8 by @Alc-Alc in #3878
- fix: update Makefile by @adhtruong in #3880
- fix(devcontainers): Replace PDM with UV by @Alc-Alc in #3879
- fix: resource warnings by @gsakkis in #3838
- fix: Enum OAS generation (#3518) by @wallseat in #3525
- fix: typo in exception message for ImproperlyConfiguredException by @Zimzozaur in #3885
- fix(file response): Support varying
mtime
semantics across different fsspec implementations by @provinzkraut in #3902 - fix(OpenAPI): Query-only properties included in path, cookie and header parameter schema and response headers (#3908) by @provinzkraut in #3909
- fix(sqlalchemy): updates to documentation based on upstream changes by @cofin in #3917
- fix(picologging): better handle unsupported environments by @cofin in #3918
- fix(channels): use
SQL
function forpsycopg
by @cofin in #3916 - fix(compression middleware): Fix resource handling by @provinzkraut in #3927
- fix(ci): only install dev tools in ubuntu by @cofin in #3931
New features 🚀
- feat: move
litestar.contrib.prometheus
tolitestar.plugins.prometheus
by @cofin in #3863 - feat: move
litestar.contrib.attrs
tolitestar.plugins.attrs
by @cofin in #3862 - feat: add
future
flag toexperimental_features
by @cofin in #3864 - feat(core): Streaming multipart parser by @provinzkraut in #3872
- feat: upgrade minimum
litestar-htmx
version by @cofin in #3884 - feat: WebSocket send stream by @provinzkraut in #3894
- feat: add query params to redirect response by @marcuslimdw in #3901
- feat: add Valkey as a native store by @ftsartek in #3892
- feat: use "path" as an error message source by @250MHz in #3920
- feat: added subprocess test client by @aranvir in #3655
- feat: add support for Python 3.13 by @cofin in #3850
- feat(ci): implement
psycopg
client installation for macos and windows by @cofin in #3932
Other changes
- docs: fix advanced alchemy references by @cofin in #3881
- docs: remove deprecated sponsor STOK by @cbscsm in #3915
- docs: mention
id
field in1-abstract-dto.rst
by @sobolevn in #3803
Full Changelog
v2.13.0...v2.14.0
v2.13.0
Sponsors 🌟
Thanks to these incredible business sponsors:
- Scalar (@scalar), Telemetry Sports (via @chris-telemetry), Avra
Thanks to these incredible personal sponsors:
- Polar.sh: @Nozavi, @cemrehancavdar, @thomastu
- GitHub Sponsors: @roboflow, @benjamin-kirkbride, @ddahan, @cbscsm
- OpenCollective: Christian Y
And a huge 'Thank you!' to all sponsors across Polar.sh, OpenCollective and GitHub Sponsors!
What's changed
New contributors 🎉
- @vvanglro made their first contribution in #3849
- @wallseat made their first contribution in #3807
- @mohammedbabelly20 made their first contribution in #3784
- @cemrehancavdar made their first contribution in #3845
- @eliasfandi made their first contribution in #3768
- @RenameMe1 made their first contribution in #3857
- @olzhasar made their first contribution in #3765
- @findstar made their first contribution in #3751
- @pogopaule made their first contribution in #3776
- @charles-dyfis-net made their first contribution in #3767
Bugfixes 🐛
- fix: sign bug in rate limit middelware by @pogopaule in #3776
- fix: map JSONSchema spec naming convention to snake_case when names from schema_extra are not found (#3766) by @charles-dyfis-net in #3767
- fix: typo in a deprecation warning in
contrib/sqlalchemy/plugins/serialization.py
by @sobolevn in #3809 - fix(prometheus): fix path template for routes without path parameters by @mohammedbabelly20 in #3784
- fix: LifespanHandler memory stream cleanup by @provinzkraut in #3836
- fix: set correct path_template value for trie node (#3806) by @wallseat in #3807
- fix: Safe Handling of "more_body" in ASGI Responses by @cemrehancavdar in #3845
- fix: Duplicate
RateLimit-*
headers with caching by @mohammedbabelly20 in #3855
New features 🚀
- feat: OpenAPI plugins send CSRF request header by @floxay in #3754
- feat: deprecate
litestar.contrib.sqlalchemy
by @cofin in #3755 - feat: implement
HTMX
plugin usinglitestar-htmx
by @cofin in #3837 - feat(Pydantic): honor hide_input_in_errors in throwing validation exceptions by @charles-dyfis-net in #3843
- feat: deprecate
litestar.contrib.pydantic
by @cofin in #3852
Documentation
- docs: update copyright notice year to 2024 by @findstar in #3751
- docs(readme): Remove reference to
litestar-pg-redis-docker
by @Alc-Alc in #3779 - docs: Fix python code highlight in many examples by @sobolevn in #3788
- docs: fix a typo in
requests
usage docs by @sobolevn in #3794 - docs: fix typos in
sqlalchemy
examples by @sobolevn in #3798 - docs: fix typos in
sqlalchemy/models_and_repository.rst
by @sobolevn in #3797 - docs: fix missing import in
cache
usage by @sobolevn in #3795 - docs: make sure that
channels
usefinally
in all examples by @sobolevn in #3796 - docs: change the
ExperimentalFeatures.DTO_CODEGEN
description by @sobolevn in #3802 - docs: change
sync-to-thread-info.rst
wording aboutsync_to_thread
by @sobolevn in #3799 - docs: add missing rename strategy to
dto
docs by @sobolevn in #3805 - docs: fix highlighted lines in DTO usage by @sobolevn in #3808
- docs: fix "DTO Factory and PATCH requests" section by @sobolevn in #3819
- docs: fix
DTO Data
section with a new example by @sobolevn in #3813 - docs: fix highlight of code example in "Providing values for nested data" by @sobolevn in #3815
- docs: rewrite htmx guide by @sobolevn in #3825
- docs: refactor "Hooks" usage documentation by @sobolevn in #3826
- docs: fix API reference for
asgi_types
scopes by @sobolevn in #3831 - docs: rewrite "Builtin middleware" usage by @sobolevn in #3830
- docs: refactor "Custom Middleware" guide by @sobolevn in #3833
- docs: refactor exception usage by @sobolevn in #3823
- docs: remove references to
python-jose
by @cofin in #3847 - docs: Changing incorrect indentation in the code example "creating-middleware#inheriting-abstractmiddleware" by @RenameMe1 in #3857
- docs: improve
openapi/index.rst
page by @sobolevn in #3856 - docs: fix the description of when to use the synchronous function by @vvanglro in #3849
- docs: Added debug=True in Testing to display exception stack trace by @RenameMe1 in #3860
Full Changelog
v2.12.1...v2.13.0
v2.12.1
Sponsors 🌟
Thanks to these incredible business sponsors:
- Scalar (@scalar), Telemetry Sports (via @chris-telemetry), Stok (@stok-team), Avra
A huge 'Thank you!' to all sponsors across Polar.sh, OpenCollective and GitHub Sponsors!
What's changed
Bugfixes 🐛
- fix(typing): Don't require annotated_types by @provinzkraut in #3750
Full Changelog
v2.12.0...v2.12.1
v2.12.0
Sponsors 🌟
Thanks to these incredible business sponsors:
- Scalar (@scalar), Telemetry Sports (via @chris-telemetry), Stok (@stok-team), Avra
Thanks to these incredible personal sponsors:
- Polar.sh: @Nozavi, @cemrehancavdar, @thomastu, @skewty, @iRod3s
- GitHub Sponsors: @roboflow, @benjamin-kirkbride, @crisog, @geeshta, @cbscsm, @ruslan-korneev
- OpenCollective: Christian Y, Anonymous
A huge 'Thank you!' to all sponsors across Polar.sh, OpenCollective and GitHub Sponsors!
What's changed
Bugfixes 🐛
- Fix overzealous warning for greedy middleware
exclude
pattern by @euri10 in #3712 - Fix dangling coroutines in request extraction handling cleanup by @provinzkraut in #3735
- Fix OpenAPI handling of
type
keyword by @provinzkraut in #3715 - Fix OpenAPI handling of invalid schema keys by @thiagozf in #3635
- Fix OpenAPI handling of
msgspec.Struct
tagged unions by @provinzkraut in #3742
New features 🚀
- Support strings in
media_type
forResponseSpec
by @provinzkraut in #3729 - Allow customizing schema component keys by @provinzkraut in #3738
- Raise exception when body parameter is annotated with non-bytes type by @provinzkraut in #3740
- Bump
scalar
OpenAPI Plugin tolatest
release by @cofin in #3747
Other changes
- Overhauled metadata handling by @provinzkraut in #3721
Full Changelog
v2.11.0...v2.12.0
v2.11.0
Sponsors 🌟
Thanks to these incredible business sponsors:
- Scalar (@scalar), Telemetry Sports (via @chris-telemetry), Stok (@stok-team), Avra
Thanks to these incredible personal sponsors:
- Polar.sh: @Nozavi, @cemrehancavdar, @thomastu, @skewty, @iRod3s
- GitHub Sponsors: @roboflow, @benjamin-kirkbride, @crisog, @geeshta, @cbscsm, @ruslan-korneev
- OpenCollective: Christian Y, Anonymous
A huge 'Thank you!' to all sponsors across Polar.sh, OpenCollective and GitHub Sponsors!
What's changed
New contributors 🎉
- @supercoder-dev made their first contribution in #3565
- @jlr295 made their first contribution in #3660
- @aarcex3 made their first contribution in #3703
- @Zimzozaur made their first contribution in #3661
- @stewit made their first contribution in #3603
- @trim21 made their first contribution in #3698
- @FarhanAliRaza made their first contribution in #3702
Bugfixes 🐛
- fix(connection): Fix creation of FormMultiDict in Request.form to properly handle multi-keys by @provinzkraut in #3639
- fix: Small docs update. by @Zimzozaur in #3661
- fix(DTO): Inconsistent use of strict mode by @provinzkraut in #3685
- fix(prometheus): use path template for prometheus metrics by @evstratbg in #3687
- fix: OpenTelemetry doesn't capture exceptions in the outermost application layer by @provinzkraut in #3689
- fix: updated sqlalchemy samples & unpin
advanced-alchemy
by @cofin in #3693 - fix(#3554): correct
module_to_os_path
to return directory paths by @supercoder-dev in #3565 - fix: csrf middleware excluding router by @trim21 in #3698
- fix: inconsistent behavior between
signature_namespace
andsignature_types
by @cofin in #3696 - fix(JWT): Response with 401 on token payload validation by @provinzkraut in #3705
New features 🚀
- feat: switched abandonded python-jose to pyjwt by @nielsvanhooy in #3684
- feat(DTO): introduce
forbid_unknown_fields
config by @provinzkraut in #3690 - feat(JWT): Custom JWT payload classes by @provinzkraut in #3692
- feat(DTO): Support
extra="forbid"
model config forPydanticDTO
by @provinzkraut in #3691 - feat(middleware): Warn about greedy exclude patterns by @provinzkraut in #3700
- feat: problem details plugin by @peterschutt in #3323
- feat(JWT): Customised token verification by @provinzkraut in #3695
Other changes
- docs: fixed bad links in
flask
migration guide by @jlr295 in #3660 - docs: Fix misplaced comment in dependency-injection.rst for better clarity by @Zimzozaur in #3671
- docs: Added Posting tool as an alternative to Postman in 06-receiving-data.rst by @Zimzozaur in #3670
- docs: Document custom types by @stewit in #3603
- docs: stale reference to pydantic signature models by @cofin in #3697
- docs: Fixing spelling in request.rst by @aarcex3 in #3703
- docs: fixed incorrect docs for default status code for http handler by @FarhanAliRaza in #3702
Full Changelog
v2.10.0...v2.11.0
v2.10.0
Sponsors 🌟
Thanks to these incredible business sponsors:
- Scalar (@scalar), Telemetry Sports (via @chris-telemetry), Stok (@stok-team), Avra
Thanks to these incredible personal sponsors:
- Polar.sh: @Nozavi, @cemrehancavdar, @thomastu, @skewty, @iRod3s
- GitHub Sponsors: @roboflow, @benjamin-kirkbride, @crisog, @geeshta, @cbscsm, @ruslan-korneev
- OpenCollective: Christian Y, Anonymous
A huge 'Thank you!' to all sponsors across Polar.sh, OpenCollective and GitHub Sponsors!
What's changed
New contributors 🎉
- @taihim made their first contribution in #3610
- @l-armstrong made their first contribution in #3618
- @Anu-cool-007 made their first contribution in #3608
- @Murtagy made their first contribution in #3526
- @tcbegley made their first contribution in #3629
- @rafalkrupinski made their first contribution in #3575
Bugfixes 🐛
- fix(signature): Fix #3593: Ensure signature model internal function signatures don't clash with model signature by @provinzkraut in #3605
- fix(OpenAPI): Correctly handle Annotated NewType by @sherbang in #3615
- fix: use
ASGIConnection
instead ofRequest
forflash
by @cofin in #3626 - fix(handlers): Allow returning
Response[None]
from head route handlers by @provinzkraut in #3641
New features 🚀
- feat: allow creating parent directories for a file store by @Murtagy in #3526
- feat(logging): add param
logging_module
toLoggingConfig
by @jderrien in #3578 - feat: add handler name to exceptions in handler validation. by @rafalkrupinski in #3575
- feat(Pydantic): added parameters in pydantic plugin to support strict validation and all the
model_dump
args by @Anu-cool-007 in #3608
Other changes
- docs: fix typos in examples.contrib.prometheus by @taihim in #3610
- docs: fixed create_ws_route_handlers typo. by @l-armstrong in #3618
- docs: fix link to available issues by @tcbegley in #3629
Full Changelog
v2.9.1...v2.10.0