summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2021-05-17 06:48:44 -0700
committerGitHub <noreply@github.com>2021-05-17 06:48:44 -0700
commit9f5db9a6d904a26f1dab777427b904a85d418e7a (patch)
tree2ea719b59bfc76e5fcaa0193411368ceb5013d98
parentfb564a84af82cc896c9b1be421a100e256254677 (diff)
parentf562a4fdea7bc10039ffa555367f8891e790ab53 (diff)
downloadjinja2-9f5db9a6d904a26f1dab777427b904a85d418e7a.tar.gz
Merge pull request #1440 from pallets/deprecated-markup
fix deprecated `Markup` subclass
-rw-r--r--CHANGES.rst2
-rw-r--r--src/jinja2/utils.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index b183522..a371b22 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -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
diff --git a/src/jinja2/utils.py b/src/jinja2/utils.py
index 8531174..2a2641c 100644
--- a/src/jinja2/utils.py
+++ b/src/jinja2/utils.py
@@ -834,7 +834,7 @@ class Namespace:
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.",