Skip to content

Commit

Permalink
Merge pull request #1440 from pallets/deprecated-markup
Browse files Browse the repository at this point in the history
fix deprecated `Markup` subclass
  • Loading branch information
davidism committed May 17, 2021
2 parents fb564a8 + f562a4f commit 9f5db9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -11,6 +11,8 @@ Unreleased
- 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`
- Fixed calling deprecated ``jinja2.Markup`` without an argument.
Use ``markupsafe.Markup`` instead. :issue:`1438`


Version 3.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/jinja2/utils.py
Expand Up @@ -834,7 +834,7 @@ def __repr__(self) -> str:


class Markup(markupsafe.Markup):
def __new__(cls, base, encoding=None, errors="strict"): # type: ignore
def __new__(cls, base="", encoding=None, errors="strict"): # type: ignore
warnings.warn(
"'jinja2.Markup' is deprecated and will be removed in Jinja"
" 3.1. Import 'markupsafe.Markup' instead.",
Expand Down

0 comments on commit 9f5db9a

Please sign in to comment.