Update to 3.0.3.

This commit is contained in:
Thomas Moschny 2021-11-15 21:25:57 +01:00
parent 652a40287b
commit b498647db8
3 changed files with 7 additions and 62 deletions

View File

@ -1,56 +0,0 @@
From 757756696ceebf9967ad8b8c6df60a2be7f23c51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Thu, 4 Nov 2021 18:03:06 +0100
Subject: [PATCH] Tests: Adapt expected traceback regexes for Python 3.11.0a1
Fixes https://github.com/pallets/jinja/issues/1526
Before:
File ".../broken.html", line 2, in <module>
{{ fail() }}
File ".../test_debug.py", line 32, in <lambda>
tmpl.render(fail=lambda: 1 / 0)
ZeroDivisionError: division by zero
After:
File ".../broken.html", line 2, in <module>
{{ fail() }}
^^^^^^^^^^^^
File ".../test_debug.py", line 32, in <lambda>
tmpl.render(fail=lambda: 1 / 0)
~~^~~
ZeroDivisionError: division by zero
---
tests/test_debug.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/test_debug.py b/tests/test_debug.py
index 0aec78ae4..1cb931cfc 100644
--- a/tests/test_debug.py
+++ b/tests/test_debug.py
@@ -36,9 +36,11 @@ def test():
test,
r"""
File ".*?broken.html", line 2, in (top-level template code|<module>)
- \{\{ fail\(\) \}\}
+ \{\{ fail\(\) \}\}(
+ \^{12})?
File ".*debug?.pyc?", line \d+, in <lambda>
- tmpl\.render\(fail=lambda: 1 / 0\)
+ tmpl\.render\(fail=lambda: 1 / 0\)(
+ ~~\^~~)?
ZeroDivisionError: (int(eger)? )?division (or modulo )?by zero
""",
)
@@ -66,7 +68,8 @@ def test():
test,
r"""
File ".*debug.pyc?", line \d+, in test
- raise TemplateSyntaxError\("wtf", 42\)
+ raise TemplateSyntaxError\("wtf", 42\)(
+ \^{36})?
(jinja2\.exceptions\.)?TemplateSyntaxError: wtf
line 42""",
)

View File

@ -1,8 +1,8 @@
%global srcname Jinja2
Name: python-jinja2
Version: 3.0.1
Release: 4%{?dist}
Version: 3.0.3
Release: 1%{?dist}
Summary: General purpose template engine
License: BSD
URL: https://palletsprojects.com/p/jinja/
@ -10,8 +10,6 @@ Source0: %{pypi_source}
# Tests: Make "Traceback did not match" an actual f-string
Patch1: https://github.com/pallets/jinja/pull/1525.patch
# Tests: Adapt expected traceback regexes for Python 3.11.0a1
Patch2: https://github.com/pallets/jinja/pull/1527.patch
# Enable building without docs to avoid a circular dependency between this
# and python-sphinx:
@ -38,7 +36,7 @@ BuildRequires: python3-devel
%if %{with docs}
BuildRequires: %{_bindir}/sphinx-build-3
BuildRequires: make
BuildRequires: python3-Pallets-Sphinx-Themes
BuildRequires: python3-Pallets-Sphinx-Themes >= 2
BuildRequires: python3-sphinxcontrib-log-cabinet
BuildRequires: python3-sphinx-issues
%endif
@ -84,6 +82,9 @@ rm -rvf docs/_build/html/.buildinfo
%changelog
* Mon Nov 15 2021 Thomas Moschny <thomas.moschny@gmx.de> - 3.0.3-1
- Update to 3.0.3.
* Mon Nov 15 2021 Thomas Moschny <thomas.moschny@gmx.de> - 3.0.1-4
- Use new Python packaging guidelines.
- Jinja2 version 3 does not support Python 2 anymore.

View File

@ -1 +1 @@
SHA512 (Jinja2-3.0.1.tar.gz) = 18ca56fb2271885c41982d2a3b2daa8bdc7a95191f54d8eec96ddbe001ac995b3fae766b603d8c9287413e5227062b771575012cd92a3f64ed76067d5f168701
SHA512 (Jinja2-3.0.3.tar.gz) = 51703d396ffe35155ed216922294441e20d44cd1ab69674140146375d4964654cdb32b38945f22916e0de917bbc0cf406cb680c2e569f9225dbe1fe4063be0b0