There might not be anything to do now, but the code that issues a DeprecationWarning since 3.0.0rc2 fails with an exception when jinja2.utils.Markup is used without arguments. The previous RC worked.
>>> import jinja2
>>> jinja2.Markup()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __new__() missing 1 required positional argument: 'base'
The correct fix is to switch to markupsafe, but the exception makes it hard to find if an application uses Markup() first.
>>> import markupsafe
>>> markupsafe.Markup()
Markup('')
While looking for the cause, I found that documentation for the autoescape argument for jinja2.Environment mentions Markup without much context; is that an issue?
Environment:
- Python version: 3.11.0a0
- Jinja version: 3.0.0
There might not be anything to do now, but the code that issues a
DeprecationWarningsince 3.0.0rc2 fails with an exception whenjinja2.utils.Markupis used without arguments. The previous RC worked.The correct fix is to switch to
markupsafe, but the exception makes it hard to find if an application usesMarkup()first.While looking for the cause, I found that documentation for the autoescape argument for
jinja2.EnvironmentmentionsMarkupwithout much context; is that an issue?Environment: