This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/8397
in repository https://gitbox.apache.org/repos/asf/allura.git

commit cd92c74f1e3be9f1ca95910a81b3f419a780e75f
Author: Dave Brondsema <[email protected]>
AuthorDate: Fri Oct 8 17:58:35 2021 +0000

    [#8397] upgrade jinja2
---
 Allura/allura/lib/helpers.py | 5 +++--
 requirements.txt             | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Allura/allura/lib/helpers.py b/Allura/allura/lib/helpers.py
index a7a334c..1ea1dd5 100644
--- a/Allura/allura/lib/helpers.py
+++ b/Allura/allura/lib/helpers.py
@@ -63,7 +63,8 @@ from tg.decorators import before_validate
 from formencode.variabledecode import variable_decode
 import formencode
 from jinja2 import Markup
-from jinja2.filters import contextfilter, escape, do_filesizeformat
+from jinja2.filters import escape, do_filesizeformat
+from jinja2.utils import pass_context
 from paste.deploy.converters import asbool, aslist, asint
 from webhelpers2 import date, text
 from webob.exc import HTTPUnauthorized
@@ -786,7 +787,7 @@ def render_any_markup(name, txt, code_mode=False, 
linenumbers_style=TABLE):
                 txt = '<pre>%s</pre>' % txt
     return Markup(txt)
 
-@contextfilter
+@pass_context
 def subrender_jinja_filter(context, value):
     _template = context.eval_ctx.environment.from_string(value)
     result = _template.render(**context)
diff --git a/requirements.txt b/requirements.txt
index a7d5b07..3116a27 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -71,7 +71,7 @@ inflection==0.5.1
     # via profanityfilter
 iso8601==0.1.16
     # via colander
-jinja2==2.11.3
+jinja2==3.0.2
     # via -r requirements.in
 markdown==2.6.11
     # via

Reply via email to