]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
fix deprecated `Markup` subclass 1439/head 1440/head
authorDavid Lord <davidism@gmail.com>
Mon, 17 May 2021 13:41:42 +0000 (06:41 -0700)
committerDavid Lord <davidism@gmail.com>
Mon, 17 May 2021 13:41:42 +0000 (06:41 -0700)
CHANGES.rst
src/jinja2/utils.py

index b1835228623364246f23c14539f6486dd00c0751..a371b22675332fb4c60c8ca5ec4477e4c8e3ad80 100644 (file)
@@ -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
index 85311747f7711117e8cbcffd6474a3e4597a0681..2a2641c0c574e6e57111612a0018a274dd23afd3 100644 (file)
@@ -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.",