Warn about falling back to jinja2_native=false (#49063)

(cherry picked from commit abdf46803b)
This commit is contained in:
Martin Krizek 2018-11-27 18:11:42 +01:00 committed by Toshio Kuratomi
parent 660f46be13
commit 5340549506
2 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- Add warning about falling back to jinja2_native=false when Jinja2 version is lower than 2.10.

View file

@ -77,6 +77,11 @@ if C.DEFAULT_JINJA2_NATIVE:
except ImportError:
from jinja2 import Environment
from jinja2.utils import concat as j2_concat
from jinja2 import __version__ as j2_version
display.warning(
'jinja2_native requires Jinja 2.10 and above. '
'Version detected: %s. Falling back to default.' % j2_version
)
else:
from jinja2 import Environment
from jinja2.utils import concat as j2_concat