Summary: | app-admin/salt broken because of changes in >=dev-python/jinja-3.1 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Carlos Konstanski <420actionunits> |
Component: | Current packages | Assignee: | Patrick McLean <chutzpah> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jstein, sam, sping |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=836336 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Carlos Konstanski
2022-03-26 16:51:24 UTC
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79dacb355a17541cc945d0fd8f76ac1c08cc28b8 commit 79dacb355a17541cc945d0fd8f76ac1c08cc28b8 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-03-27 00:58:52 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-03-27 01:00:09 +0000 app-admin/salt: add patch for newer Jinja Bug: https://bugs.gentoo.org/836206 Signed-off-by: Sam James <sam@gentoo.org> app-admin/salt/files/salt-3003.3-jinja.patch | 155 ++++++++++++++++++++ app-admin/salt/salt-3003.3-r1.ebuild | 203 +++++++++++++++++++++++++++ 2 files changed, 358 insertions(+) I've only patched 3003.3 (in -r1). I believe we are done here: # grep jinja *.ebuild salt-3004.2-r2.ebuild: >=dev-python/jinja-3.0[${PYTHON_USEDEP}] salt-3004.2-r2.ebuild: "${FILESDIR}/salt-3004.2-jinja-3.patch" salt-3005.1.ebuild: >=dev-python/jinja-3.0.3[${PYTHON_USEDEP}] salt-3005.1-r1.ebuild: >=dev-python/jinja-3.0.3[${PYTHON_USEDEP}] salt-3005-r1.ebuild: >=dev-python/jinja-3.0.3[${PYTHON_USEDEP}] Closing, please re-open as needed. @sam thanks for the patch! Turned out mistaken, "from jinja2 import Markup" is still in there and doesn't work with jinja2 3.1, reopening... # python3.9 -c 'from jinja2 import Markup' Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: cannot import name 'Markup' from 'jinja2' (/usr/lib/python3.9/site-packages/jinja2/__init__.py) Second try. "from jinja2 import Markup" is part of this combo by now: # grep -Rw -B4 'from jinja2.*Markup' salt-3005.1/ salt-3005.1/tests/pytests/unit/utils/jinja/test_jinja.py-try: salt-3005.1/tests/pytests/unit/utils/jinja/test_jinja.py- from markupsafe import Markup salt-3005.1/tests/pytests/unit/utils/jinja/test_jinja.py-except ImportError: salt-3005.1/tests/pytests/unit/utils/jinja/test_jinja.py- # jinja < 3.1 salt-3005.1/tests/pytests/unit/utils/jinja/test_jinja.py: from jinja2 import Markup -- salt-3005.1/salt/utils/jinja.py-try: salt-3005.1/salt/utils/jinja.py- from markupsafe import Markup salt-3005.1/salt/utils/jinja.py-except ImportError: salt-3005.1/salt/utils/jinja.py- # jinja < 3.1 salt-3005.1/salt/utils/jinja.py: from jinja2 import Markup So as long as markupsafe is around, we're good. Is it around?: # grep markupsafe *.ebuild salt-3004.2-r2.ebuild: dev-python/markupsafe[${PYTHON_USEDEP}] salt-3005.1.ebuild: >=dev-python/markupsafe-2.0.1[${PYTHON_USEDEP}] salt-3005.1-r1.ebuild: >=dev-python/markupsafe-2.0.1[${PYTHON_USEDEP}] salt-3005-r1.ebuild: >=dev-python/markupsafe-2.0.1[${PYTHON_USEDEP}] This^^ makes sure it is around. Closing, please re-open as needed. |