]> git.ipfire.org Git - thirdparty/starlette.git/commit
Fail fast on invalid `Jinja2Template` instantiation parameters (#2568)
authorPierre Delagrave <pierre.delagrave@dialogue.co>
Sat, 20 Apr 2024 07:54:26 +0000 (03:54 -0400)
committerGitHub <noreply@github.com>
Sat, 20 Apr 2024 07:54:26 +0000 (07:54 +0000)
commit9cf26eebd190c54deadc2a2468ce300ba886ab18
tree7d6eb7b74d12e7114057865625907a117f15a952
parent9bd1b817d49c02f10561e1f6028e83f2c8190850
Fail fast on invalid `Jinja2Template` instantiation parameters (#2568)

Calling `Jinja2Template()` with both `directory` and `env` shouldn't be allowed. When both parameters were used, the passed `env` was silently ignored in favor of creating a new one with the provided `directory` and the deprecated `env_options`.
starlette/templating.py
tests/test_templates.py