Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR contains breaking changes, so the new release that'll officially get these features will be
2.0
.Features:
hx()
andpage()
) decorators and the Jinja integration got support for error rendering. Fixes Make it possible to register renderers for exceptions raised in decorated routes #28.Response
dependency for example in a route). Fixes Keep the status code if it was set inside the route #26 Preserve the background task if the response had one #27.JinjaPath
utility, see docs for details.Breaking changes:
RequestComponentSelector
protocol got a second argument (error: Exception | None
).Jinja
changed slightly.How to upgrade:
RequestComponentSelector
implementations, then please add the new argument to theget_component_id()
method. Well-behavedRequestComponentSelector
s that don's support error rendering should reraise the received error if it's notNone
(although not doing so will not break anything as result and errors are clearly separated inJinja
and the core decorators don't rely on this protocol).Jinja
, please go through this PR so you can upgrade your custom implementation.