Skip to content
Myr

mention jinja in deprecation message

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent f04bde8 · Browse files · 4 files+23 added−17 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+23 added−17 removed

  • other:+23 added−17 removed

4 files+23 added−17 removed

modified:src/jinja2/ext.py+3 added-3 removed
511 unmodified lines
512 def __init__(self, environment):513 super().__init__(environment)514 warnings.warn(515 "The 'with' extension is deprecated and will be removed in"516 " version 3.1. This is built in now.",516 " Jinja 3.1. This is built in now.",517 DeprecationWarning,518 stacklevel=2,519 )520
1 unmodified line
522class AutoEscapeExtension(Extension):523 def __init__(self, environment):524 super().__init__(environment)525 warnings.warn(526 "The 'autoescape' extension is deprecated and will be removed in"527 " version 3.1. This is built in now.",526 "The 'autoescape' extension is deprecated and will be"527 " removed in Jinja 3.1. This is built in now.",528 DeprecationWarning,529 stacklevel=2,530 )531
236 unmodified lines
modified:src/jinja2/filters.py+9 added-6 removed
43 unmodified lines
4445def contextfilter(f):46 """Pass the context as the first argument to the decorated function.4748 .. deprecated:: 3.0.049 Use :func:`~jinja2.pass_context` instead.48 .. deprecated:: 3.049 Will be removed in Jinja 3.1. Use :func:`~jinja2.pass_context`50 instead.51 """52 warnings.warn(53 "'contextfilter' is renamed to 'pass_context', the old name"54 " will be removed in Jinja 3.1.",
6 unmodified lines
61def evalcontextfilter(f):62 """Pass the eval context as the first argument to the decorated63 function.6464 .. deprecated:: 3.0.065 Use :func:`~jinja2.pass_eval_context` instead.65 .. deprecated:: 3.066 Will be removed in Jinja 3.1. Use67 :func:`~jinja2.pass_eval_context` instead.6869 .. versionadded:: 2.470 """71 warnings.warn(
8 unmodified lines
80def environmentfilter(f):81 """Pass the environment as the first argument to the decorated82 function.8382 .. deprecated:: 3.0.083 Use :func:`~jinja2.pass_environment` instead.84 .. deprecated:: 3.085 Will be removed in Jinja 3.1. Use86 :func:`~jinja2.pass_environment` instead.87 """88 warnings.warn(89 "'environmentfilter' is renamed to 'pass_environment', the old"90 " name will be removed in Jinja 3.1.",
1725 unmodified lines
modified:src/jinja2/runtime.py+1 added-1 removed
76 unmodified lines
77 import warnings7879 warnings.warn(80 "This template must be recompiled with at least Jinja 3.0, or"81 " it will fail in 3.1.",81 " it will fail in Jinja 3.1.",82 DeprecationWarning,83 stacklevel=2,84 )85 return str_join(seq)
964 unmodified lines
modified:src/jinja2/utils.py+10 added-7 removed
97 unmodified lines
9899def contextfunction(f):100 """Pass the context as the first argument to the decorated function.101102 .. deprecated:: 3.0.0103 Use :func:`~jinja2.pass_context` instead.102 .. deprecated:: 3.0103 Will be removed in Jinja 3.1. Use :func:`~jinja2.pass_context`104 instead.105 """106 warnings.warn(107 "'contextfunction' is renamed to 'pass_context', the old name"108 " will be removed in Jinja 3.1.",
6 unmodified lines
115def evalcontextfunction(f):116 """Pass the eval context as the first argument to the decorated117 function.118118 .. deprecated:: 3.0.0119 Use :func:`~jinja2.pass_eval_context` instead.119 .. deprecated:: 3.0120 Will be removed in Jinja 3.1. Use121 :func:`~jinja2.pass_eval_context` instead.122123 .. versionadded:: 2.4124 """125 warnings.warn(
8 unmodified lines
134def environmentfunction(f):135 """Pass the environment as the first argument to the decorated136 function.137136 .. deprecated:: 3.0.0137 Use :func:`~jinja2.pass_environment` instead.138 .. deprecated:: 3.0139 Will be removed in Jinja 3.1. Use140 :func:`~jinja2.pass_environment` instead.141 """142 warnings.warn(143 "'environmentfunction' is renamed to 'pass_environment', the"144 " old name will be removed in Jinja 3.1.",
334 unmodified lines
479 import warnings480481 warnings.warn(482 "'unicode_urlencode' has been renamed to 'url_quote'. The old"480 " name will be removed in version 3.1.",483 " name will be removed in Jinja 3.1.",484 DeprecationWarning,485 stacklevel=2,486 )487 return url_quote(obj, charset=charset, for_qs=for_qs)
366 unmodified lines