]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
show context for deprecated extensions 1436/head
authorDavid Lord <davidism@gmail.com>
Fri, 14 May 2021 00:48:19 +0000 (17:48 -0700)
committerDavid Lord <davidism@gmail.com>
Fri, 14 May 2021 00:48:19 +0000 (17:48 -0700)
CHANGES.rst
src/jinja2/ext.py

index bc05ed490ce294a383779e05f04c54c4039efbb9..b1835228623364246f23c14539f6486dd00c0751 100644 (file)
@@ -9,6 +9,8 @@ Unreleased
 -   Mark top-level names as exported so type checking understands
     imports in user projects. :issue:`1426`
 -   Fix some types that weren't available in Python 3.6.0. :issue:`1433`
+-   The deprecation warning for unneeded ``autoescape`` and ``with_``
+    extensions shows more relevant context. :issue:`1429`
 
 
 Version 3.0.0
index 9c5498becd582295b694883d9e912b327234bfd1..3e982930c4ed496d7bb43058897a8f3268f6caeb 100644 (file)
@@ -604,7 +604,7 @@ class WithExtension(Extension):
             "The 'with' extension is deprecated and will be removed in"
             " Jinja 3.1. This is built in now.",
             DeprecationWarning,
-            stacklevel=2,
+            stacklevel=3,
         )
 
 
@@ -615,7 +615,7 @@ class AutoEscapeExtension(Extension):
             "The 'autoescape' extension is deprecated and will be"
             " removed in Jinja 3.1. This is built in now.",
             DeprecationWarning,
-            stacklevel=2,
+            stacklevel=3,
         )