Skip to content
Myr

remove deprecated extensions

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 a42b291 · Browse files · 2 files+5 added−25 removed
This commit

State

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

Diff stats

2 files+5 added−25 removed

  • other:+5 added−25 removed

2 files+5 added−25 removed

modified:src/jinja2/ext.py-25 removed
1"""Extension API for adding custom tags and behavior."""2import pprint3import re4import typing as t5import warnings56from markupsafe import Markup78from . import defaults
586 unmodified lines
595 return nodes.Break(lineno=token.lineno)596 return nodes.Continue(lineno=token.lineno)597598600class WithExtension(Extension):601 def __init__(self, environment: Environment) -> None:602 super().__init__(environment)603 warnings.warn(604 "The 'with' extension is deprecated and will be removed in"605 " Jinja 3.1. This is built in now.",606 DeprecationWarning,607 stacklevel=3,608 )609610611class AutoEscapeExtension(Extension):612 def __init__(self, environment: Environment) -> None:613 super().__init__(environment)614 warnings.warn(615 "The 'autoescape' extension is deprecated and will be"616 " removed in Jinja 3.1. This is built in now.",617 DeprecationWarning,618 stacklevel=3,619 )620621599class DebugExtension(Extension):600 """A ``{% debug %}`` tag that dumps the available variables,601 filters, and tests.602
247 unmodified lines
850#: nicer import names851i18n = InternationalizationExtension852do = ExprStmtExtension853loopcontrols = LoopControlExtension877with_ = WithExtension878autoescape = AutoEscapeExtension854debug = DebugExtension
modified:CHANGES.rst+5 added
3 unmodified lines
4-------------56Unreleased78- Drop support for Python 3.6. :pr:`1534`9- Remove previously deprecated code. :pr:`1544`1011 - ``WithExtension`` and ``AutoEscapeExtension`` are built-in now.121314Version 3.0.315-------------1617Released 2021-11-09
909 unmodified lines