From 590e534d4e6b945929313ff9390f1dbef5f7acc6 Mon Sep 17 00:00:00 2001 From: zhuofeng Date: Fri, 26 Jan 2024 09:26:48 +0800 Subject: [PATCH] make the test check and adapt python2 grammer --- backport-CVE-2024-22195.patch | 2 +- python-jinja2.spec | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/backport-CVE-2024-22195.patch b/backport-CVE-2024-22195.patch index 8b5bfee..0f9ac5c 100644 --- a/backport-CVE-2024-22195.patch +++ b/backport-CVE-2024-22195.patch @@ -18,7 +18,7 @@ index 9741567..3230539 100644 """Convert a value to lowercase.""" return soft_unicode(s).lower() -+_space_re = re.compile(r"\s", flags=re.ASCII) ++_space_re = re.compile(r"\s", re.U) @evalcontextfilter def do_xmlattr(_eval_ctx, d, autospace=True): diff --git a/python-jinja2.spec b/python-jinja2.spec index 4e04048..83b3743 100644 --- a/python-jinja2.spec +++ b/python-jinja2.spec @@ -2,7 +2,7 @@ Name: python-jinja2 Version: 2.11.2 -Release: 5 +Release: 6 Summary: A full-featured template engine for Python License: BSD URL: http://jinja.pocoo.org/ @@ -83,6 +83,11 @@ pushd python3 popd %check +%if %{with python2} +pushd Jinja2-%{version} +PYTHONPATH=$(pwd)/src %{__python2} -m pytest tests +popd +%endif pushd python3 PYTHONPATH=$(pwd)/src %{__python3} -m pytest tests popd @@ -104,6 +109,12 @@ popd %doc Jinja2-%{version}/ext Jinja2-%{version}/examples %changelog +* Fri Jan 26 2024 zhuofeng - 2.11.2-6 + Type:bugfix + CVE:NA + SUG:NA + DESC:make the test check and adapt python2 grammer + * Thu Jan 25 2024 zhuofeng - 2.11.2-5 Type:bugfix CVE:NA -- Gitee