Skip to content

Commit

Permalink
Merge pull request #30 from volfpeter/migration-guide-v1-to-v2
Browse files Browse the repository at this point in the history
Added a migration guide to the docs
  • Loading branch information
volfpeter authored Aug 27, 2024
2 parents 33f374e + 28d3894 commit 154a064
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/migrations/1-to-2.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 2 additions & 0 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ nav:
- api/jinja.md
- api/dependencies.md
- api/typing.md
- Migrations:
- migrations/1-to-2.md

0 comments on commit 154a064

Please sign in to comment.