summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2021-04-15 15:32:57 -0700
committerDavid Lord <davidism@gmail.com>2021-04-15 15:32:57 -0700
commitb98182fc376548493ee0c1d70d3f962356cfeada (patch)
tree72b706c2f8fbf6f73a8c0d2d383082815871bba4
parentf04bde83348f22e07bf1cbc769e1dabbde7f663e (diff)
downloadjinja2-b98182fc376548493ee0c1d70d3f962356cfeada.tar.gz
mention jinja in deprecation message
-rw-r--r--src/jinja2/ext.py6
-rw-r--r--src/jinja2/filters.py15
-rw-r--r--src/jinja2/runtime.py2
-rw-r--r--src/jinja2/utils.py17
4 files changed, 23 insertions, 17 deletions
diff --git a/src/jinja2/ext.py b/src/jinja2/ext.py
index cbcf8f3..2cca1b3 100644
--- a/src/jinja2/ext.py
+++ b/src/jinja2/ext.py
@@ -513,7 +513,7 @@ class WithExtension(Extension):
super().__init__(environment)
warnings.warn(
"The 'with' extension is deprecated and will be removed in"
- " version 3.1. This is built in now.",
+ " Jinja 3.1. This is built in now.",
DeprecationWarning,
stacklevel=2,
)
@@ -523,8 +523,8 @@ class AutoEscapeExtension(Extension):
def __init__(self, environment):
super().__init__(environment)
warnings.warn(
- "The 'autoescape' extension is deprecated and will be removed in"
- " version 3.1. This is built in now.",
+ "The 'autoescape' extension is deprecated and will be"
+ " removed in Jinja 3.1. This is built in now.",
DeprecationWarning,
stacklevel=2,
)
diff --git a/src/jinja2/filters.py b/src/jinja2/filters.py
index 8aa11c2..2684683 100644
--- a/src/jinja2/filters.py
+++ b/src/jinja2/filters.py
@@ -45,8 +45,9 @@ if t.TYPE_CHECKING:
def contextfilter(f):
"""Pass the context as the first argument to the decorated function.
- .. deprecated:: 3.0.0
- Use :func:`~jinja2.pass_context` instead.
+ .. deprecated:: 3.0
+ Will be removed in Jinja 3.1. Use :func:`~jinja2.pass_context`
+ instead.
"""
warnings.warn(
"'contextfilter' is renamed to 'pass_context', the old name"
@@ -61,8 +62,9 @@ def evalcontextfilter(f):
"""Pass the eval context as the first argument to the decorated
function.
- .. deprecated:: 3.0.0
- Use :func:`~jinja2.pass_eval_context` instead.
+ .. deprecated:: 3.0
+ Will be removed in Jinja 3.1. Use
+ :func:`~jinja2.pass_eval_context` instead.
.. versionadded:: 2.4
"""
@@ -79,8 +81,9 @@ def environmentfilter(f):
"""Pass the environment as the first argument to the decorated
function.
- .. deprecated:: 3.0.0
- Use :func:`~jinja2.pass_environment` instead.
+ .. deprecated:: 3.0
+ Will be removed in Jinja 3.1. Use
+ :func:`~jinja2.pass_environment` instead.
"""
warnings.warn(
"'environmentfilter' is renamed to 'pass_environment', the old"
diff --git a/src/jinja2/runtime.py b/src/jinja2/runtime.py
index 0b49486..1cdc858 100644
--- a/src/jinja2/runtime.py
+++ b/src/jinja2/runtime.py
@@ -78,7 +78,7 @@ def unicode_join(seq):
warnings.warn(
"This template must be recompiled with at least Jinja 3.0, or"
- " it will fail in 3.1.",
+ " it will fail in Jinja 3.1.",
DeprecationWarning,
stacklevel=2,
)
diff --git a/src/jinja2/utils.py b/src/jinja2/utils.py
index c49dbb5..96c0d19 100644
--- a/src/jinja2/utils.py
+++ b/src/jinja2/utils.py
@@ -99,8 +99,9 @@ class _PassArg(enum.Enum):
def contextfunction(f):
"""Pass the context as the first argument to the decorated function.
- .. deprecated:: 3.0.0
- Use :func:`~jinja2.pass_context` instead.
+ .. deprecated:: 3.0
+ Will be removed in Jinja 3.1. Use :func:`~jinja2.pass_context`
+ instead.
"""
warnings.warn(
"'contextfunction' is renamed to 'pass_context', the old name"
@@ -115,8 +116,9 @@ def evalcontextfunction(f):
"""Pass the eval context as the first argument to the decorated
function.
- .. deprecated:: 3.0.0
- Use :func:`~jinja2.pass_eval_context` instead.
+ .. deprecated:: 3.0
+ Will be removed in Jinja 3.1. Use
+ :func:`~jinja2.pass_eval_context` instead.
.. versionadded:: 2.4
"""
@@ -133,8 +135,9 @@ def environmentfunction(f):
"""Pass the environment as the first argument to the decorated
function.
- .. deprecated:: 3.0.0
- Use :func:`~jinja2.pass_environment` instead.
+ .. deprecated:: 3.0
+ Will be removed in Jinja 3.1. Use
+ :func:`~jinja2.pass_environment` instead.
"""
warnings.warn(
"'environmentfunction' is renamed to 'pass_environment', the"
@@ -477,7 +480,7 @@ def unicode_urlencode(obj, charset="utf-8", for_qs=False):
warnings.warn(
"'unicode_urlencode' has been renamed to 'url_quote'. The old"
- " name will be removed in version 3.1.",
+ " name will be removed in Jinja 3.1.",
DeprecationWarning,
stacklevel=2,
)