[FastAPI] Jinja contextfilter renamed to pass_context
aurweb/util.py:88
/builds/kevr/aurweb/aurweb/util.py:88: DeprecationWarning: 'contextfilter' is renamed to 'pass_context', the old name will be removed in Jinja 3.1.
def account_url(context, user):
aurweb/captcha.py:45
/builds/kevr/aurweb/aurweb/captcha.py:45: DeprecationWarning: 'contextfilter' is renamed to 'pass_context', the old name will be removed in Jinja 3.1.
def captcha_salt_filter(context):
aurweb/captcha.py:52
/builds/kevr/aurweb/aurweb/captcha.py:52: DeprecationWarning: 'contextfilter' is renamed to 'pass_context', the old name will be removed in Jinja 3.1.
def captcha_cmdline_filter(context, salt):
aurweb/l10n.py:92
/builds/kevr/aurweb/aurweb/l10n.py:92: DeprecationWarning: 'contextfilter' is renamed to 'pass_context', the old name will be removed in Jinja 3.1.
def tr(context: typing.Any, value: str):
-- Docs: https://docs.pytest.org/en/stable/warnings.html
======================= 134 passed, 4 warnings in 58.68s =======================
This warning specifically talks about the decorator we use to create context-aware filters, like tr
. We need to replace all instances of @contextfilter
with @pass_context
, as far as I can tell.
Edited by Kevin Morris