mirror of
https://gitee.com/openharmony/third_party_jinja2
synced 2025-02-21 08:13:54 +00:00
Merge pull request #1439 from pallets/deprecated-markup
fix deprecated `Markup` subclass
This commit is contained in:
commit
ab7840328f
@ -17,6 +17,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
|
||||
|
@ -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.",
|
||||
|
Loading…
x
Reference in New Issue
Block a user