Commit b7a7225
refactor(minijinja): migrate callers to plugins.minijinja and remove contrib path
- Migrate every internal call site (tests, doc examples, the lazy
import inside `litestar.plugins.flash`) to
`from litestar.plugins.minijinja import ...`. The flash.py change
preserves the public/private split: it still imports both
`MiniJinjaTemplateEngine` and the module-level `_transform_state`
helper.
- Delete `litestar/contrib/minijinja.py`. The contrib path is gone on
main; the v2 follow-up PR adds a deprecation shim at the contrib
location covering both public symbols and `_transform_state`, so 2.x
users (whose flash.py still imports from contrib) get a
`DeprecationWarning` window with a real migration target on the
version they are already running.
- Salvage the contrib functional tests into
`tests/unit/test_plugins/test_minijinja.py` (99% line coverage on
the new module) and delete `tests/unit/test_contrib/test_minijinja.py`.
- Add `docs/reference/plugins/minijinja.rst`; update the plugins
reference toctree.
Co-authored-by: xronocode <myevdokimov@gmail.com>1 parent 1ba9eec commit b7a7225
17 files changed
Lines changed: 110 additions & 259 deletions
File tree
- docs
- examples
- plugins/flash_messages
- templating
- reference/plugins
- litestar
- contrib
- plugins
- tests/unit
- test_contrib
- test_plugins
- test_template
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
This file was deleted.
0 commit comments