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

pull/49205/head
Martin Krizek 6 years ago committed by GitHub
parent 67a70a1205
commit abdf46803b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

@ -74,6 +74,11 @@ if C.DEFAULT_JINJA2_NATIVE:
except ImportError: except ImportError:
from jinja2 import Environment from jinja2 import Environment
from jinja2.utils import concat as j2_concat 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: else:
from jinja2 import Environment from jinja2 import Environment
from jinja2.utils import concat as j2_concat from jinja2.utils import concat as j2_concat

Loading…
Cancel
Save