Skip to content

Commit

Permalink
remove deprecated extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed Nov 9, 2021
1 parent a42b291 commit ac9dbfc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 25 deletions.
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ Version 3.1.0

Unreleased

- Drop support for Python 3.6. :pr:`1534`
- Remove previously deprecated code. :pr:`1544`

- ``WithExtension`` and ``AutoEscapeExtension`` are built-in now.


Version 3.0.3
-------------
Expand Down
25 changes: 0 additions & 25 deletions src/jinja2/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import pprint
import re
import typing as t
import warnings

from markupsafe import Markup

Expand Down Expand Up @@ -597,28 +596,6 @@ def parse(self, parser: "Parser") -> t.Union[nodes.Break, nodes.Continue]:
return nodes.Continue(lineno=token.lineno)


class WithExtension(Extension):
def __init__(self, environment: Environment) -> None:
super().__init__(environment)
warnings.warn(
"The 'with' extension is deprecated and will be removed in"
" Jinja 3.1. This is built in now.",
DeprecationWarning,
stacklevel=3,
)


class AutoEscapeExtension(Extension):
def __init__(self, environment: Environment) -> None:
super().__init__(environment)
warnings.warn(
"The 'autoescape' extension is deprecated and will be"
" removed in Jinja 3.1. This is built in now.",
DeprecationWarning,
stacklevel=3,
)


class DebugExtension(Extension):
"""A ``{% debug %}`` tag that dumps the available variables,
filters, and tests.
Expand Down Expand Up @@ -874,6 +851,4 @@ def getbool(options: t.Mapping[str, str], key: str, default: bool = False) -> bo
i18n = InternationalizationExtension
do = ExprStmtExtension
loopcontrols = LoopControlExtension
with_ = WithExtension
autoescape = AutoEscapeExtension
debug = DebugExtension

0 comments on commit ac9dbfc

Please sign in to comment.