Skip to content

v2.0.0-rc1

Compare
Choose a tag to compare
@volfpeter volfpeter released this 27 Aug 20:24
· 8 commits to main since this release
33f374e

What's Changed

Features:

  • Both the core (hx() and page()) decorators and the Jinja integration got support for error rendering. Fixes #28.
  • Response status code and background job are preserved (if set on the Response dependency for example in a route). Fixes #26 #27.
  • Added a JinjaPath utility, see docs for details.

Breaking changes:

  • To support error rendering, the RequestComponentSelector protocol got a second argument (error: Exception | None).
  • The internals of Jinja changed slightly.

How to upgrade:

  • If you have custom RequestComponentSelector implementations, then please add the new argument to the get_component_id() method. Well-behaved RequestComponentSelectors that don's support error rendering should reraise the received error if it's not None (although not doing so will not break anything as result and errors are clearly separated in Jinja and the core decorators don't rely on this protocol).
  • If you've overridden any of the protected methods of Jinja, please go through this PR so you can upgrade your custom implementation.

Full Changelog: v1.1.1...v2.0.0-rc1