Public bug reported:
/usr/lib/python3/dist-packages/salt/utils/jinja.py attempts to import
Markup from jinja2. That is not available in the version of jinja2
installed.
In addition it calls jinja2.contextfunction which is no-longer
available.
/salt/utils/jinja.py on SaltStack's github repo has the relevant fixes:
replacing
from jinja2 import BaseLoader, Markup, TemplateNotFound, nodes
with
from jinja2 import BaseLoader, TemplateNotFound, nodes
try:
from markupsafe import Markup
except ImportError:
# jinja < 3.1
from jinja2 import Markup
and
replacing
@jinja2.contextfunction
def show_full_context(ctx):
return salt.utils.data.simple_types_filter(
{key: value for key, value in ctx.items()}
)
with
try:
contextfunction = jinja2.contextfunction
except AttributeError:
contextfunction = jinja2.pass_context
@contextfunction
def show_full_context(ctx):
return salt.utils.data.simple_types_filter(
{key: value for key, value in ctx.items()}
)
** Affects: salt (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1977552
Title:
salt-common Jinja utils not compatible with installed jinja2
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/salt/+bug/1977552/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs