Your message dated Sun, 02 Apr 2023 17:56:02 +0000
with message-id <[email protected]>
and subject line unblock cookiecutter
has caused the Debian Bug report #1033842,
regarding unblock: cookiecutter/1.7.3-3
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1033842: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033842
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: release.debian.org
Control: affects -1 + src:cookiecutter
X-Debbugs-Cc: [email protected]
User: [email protected]
Usertags: unblock
Severity: normal

Please unblock package cookiecutter.

[ Reason ]
Prevent autoremoval by FTBFS bug #1033431.

[ Impact ]
The package will be autoremoved from bookworm if not unblocked.

[ Tests ]
Building the package from source fails during jinja2-dependent unit tests.

[ Risks ]
The fix comes from upstream. There are not many reverse dependencies,
so the risk should not be too high.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

unblock cookiecutter/1.7.3-3
diff -Nru cookiecutter-1.7.3/debian/changelog 
cookiecutter-1.7.3/debian/changelog
--- cookiecutter-1.7.3/debian/changelog 2022-06-12 03:51:04.000000000 +0200
+++ cookiecutter-1.7.3/debian/changelog 2023-03-29 21:33:22.000000000 +0200
@@ -1,3 +1,12 @@
+cookiecutter (1.7.3-3) unstable; urgency=high
+
+  * Team Upload.
+  * d/patches/0004-Fix-relative-path-that-come-from-Jinja2.patch: Add patch to
+    fix the relative paths that come from Jinja2 in test_generate_file test
+    (Closes: #1033431).
+
+ -- Emmanuel Arias <[email protected]>  Wed, 29 Mar 2023 16:33:22 -0300
+
 cookiecutter (1.7.3-2) unstable; urgency=medium
 
   [ Ondřej Nový ]
diff -Nru 
cookiecutter-1.7.3/debian/patches/0004-Fix-relative-path-that-come-from-Jinja2.patch
 
cookiecutter-1.7.3/debian/patches/0004-Fix-relative-path-that-come-from-Jinja2.patch
--- 
cookiecutter-1.7.3/debian/patches/0004-Fix-relative-path-that-come-from-Jinja2.patch
        1970-01-01 01:00:00.000000000 +0100
+++ 
cookiecutter-1.7.3/debian/patches/0004-Fix-relative-path-that-come-from-Jinja2.patch
        2023-03-29 21:33:22.000000000 +0200
@@ -0,0 +1,53 @@
+From 980ff089efaef27b99b97525f6a206bd7c3f2282 Mon Sep 17 00:00:00 2001
+From: Maciej Patro <[email protected]>
+Date: Sat, 7 May 2022 09:55:59 +0200
+Subject: [PATCH] test_generate_file_verbose_template_syntax_error fixed Fixes
+ #1655 - relative path that comes directly from Jinja2 TemplateSyntaxError in
+ some cases is in format "./tests/..." in other "tests/... now both cases are
+ accepted as a valid outcome.
+
+---
+ tests/test_generate_file.py | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+Index: cookiecutter/tests/test_generate_file.py
+===================================================================
+--- cookiecutter.orig/tests/test_generate_file.py      2023-03-28 
16:43:24.875746930 -0300
++++ cookiecutter/tests/test_generate_file.py   2023-03-28 16:46:20.535523930 
-0300
+@@ -6,6 +6,7 @@
+ 
+ import json
+ import os
++import re
+ 
+ import pytest
+ from jinja2 import FileSystemLoader
+@@ -102,17 +103,16 @@
+ 
+ 
+ @pytest.fixture
+-def expected_msg():
++def expected_msg_regex():
+     """Fixture. Used to ensure that exception generated text contain full 
data."""
+-    msg = (
++    return re.compile(
+         'Missing end of comment tag\n'
+-        '  File "./tests/files/syntax_error.txt", line 1\n'
+-        '    I eat {{ syntax_error }} {# this comment is not closed}'
++        ' {2}File "(.[/\\\\])*tests[/\\\\]files[/\\\\]syntax_error.txt", line 
1\n'
++        ' {4}I eat {{ syntax_error }} {# this comment is not closed}'
+     )
+-    return msg.replace("/", os.sep)
+ 
+ 
+-def test_generate_file_verbose_template_syntax_error(env, expected_msg):
++def test_generate_file_verbose_template_syntax_error(env, expected_msg_regex):
+     """Verify correct exception raised on syntax error in file before 
generation."""
+     with pytest.raises(TemplateSyntaxError) as exception:
+         generate.generate_file(
+@@ -121,4 +121,4 @@
+             context={'syntax_error': 'syntax_error'},
+             env=env,
+         )
+-    assert str(exception.value) == expected_msg
++    assert expected_msg_regex.match(str(exception.value)) is not None
diff -Nru cookiecutter-1.7.3/debian/patches/series 
cookiecutter-1.7.3/debian/patches/series
--- cookiecutter-1.7.3/debian/patches/series    2022-06-12 03:51:04.000000000 
+0200
+++ cookiecutter-1.7.3/debian/patches/series    2023-03-29 21:33:22.000000000 
+0200
@@ -1,3 +1,4 @@
 0001-Don-t-test-for-.DS_Store.patch
 0002-Use-PyYAML-instead-of-poyo.patch
 0003-Remove-all-privacy-breach-images-from-documentation.patch
+0004-Fix-relative-path-that-come-from-Jinja2.patch

--- End Message ---
--- Begin Message ---
Unblocked.

--- End Message ---

Reply via email to