From 28d3894e542796feabffd2e7b8567bd309ec0dd7 Mon Sep 17 00:00:00 2001 From: Peter Volf Date: Tue, 27 Aug 2024 22:37:55 +0200 Subject: [PATCH] added a migration guide to the docs --- docs/migrations/1-to-2.md | 6 ++++++ mkdocs.yaml | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 docs/migrations/1-to-2.md diff --git a/docs/migrations/1-to-2.md b/docs/migrations/1-to-2.md new file mode 100644 index 0000000..5ea42a3 --- /dev/null +++ b/docs/migrations/1-to-2.md @@ -0,0 +1,6 @@ +# From v1 to v2 + +Version 2 added exception rendering as the main feature, which required some API changes. Here is how you should upgrade your code to be compatible with version 2: + +- If you have custom `RequestComponentSelector` implementations, then please add the new argument to the `get_component_id()` method. Well-behaved `RequestComponentSelector`s 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. diff --git a/mkdocs.yaml b/mkdocs.yaml index 250cbfe..a526ba9 100644 --- a/mkdocs.yaml +++ b/mkdocs.yaml @@ -52,3 +52,5 @@ nav: - api/jinja.md - api/dependencies.md - api/typing.md + - Migrations: + - migrations/1-to-2.md