From 0a763a13ef55964395dff60283ececc16f957792 Mon Sep 17 00:00:00 2001 From: Derek Kulinski Date: Sun, 8 May 2022 01:30:39 -0700 Subject: [PATCH] Fix Jinja2 3.1.0 --- salt/utils/jinja.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/salt/utils/jinja.py b/salt/utils/jinja.py index 0cb70bf64a..322c2f7f46 100644 --- a/salt/utils/jinja.py +++ b/salt/utils/jinja.py @@ -25,10 +25,11 @@ import salt.utils.json import salt.utils.stringutils import salt.utils.url import salt.utils.yaml -from jinja2 import BaseLoader, Markup, TemplateNotFound, nodes +from jinja2 import BaseLoader, TemplateNotFound, nodes from jinja2.environment import TemplateModule from jinja2.exceptions import TemplateRuntimeError from jinja2.ext import Extension +from markupsafe import Markup from salt.exceptions import TemplateError from salt.utils.decorators.jinja import jinja_filter, jinja_global, jinja_test from salt.utils.odict import OrderedDict @@ -706,7 +707,7 @@ def method_call(obj, f_name, *f_args, **f_kwargs): return getattr(obj, f_name, lambda *args, **kwargs: None)(*f_args, **f_kwargs) -@jinja2.contextfunction +@jinja2.pass_context def show_full_context(ctx): return salt.utils.data.simple_types_filter( {key: value for key, value in ctx.items()} -- 2.35.1