Bug#1005779: djangorestframework: autopkgtest needs update for new version of pygments

2022-03-13 Thread Paul Gevers
Source: djangorestframework
Version: 3.12.4-2
Followup-For: Bug #1005779

Dear maintainer,

I prepared an NMU to fix this issue, as it's blocking the migration of
pygments to testing.

I uploaded to DELAYED/5. Please cancel it or tell me to cancel it if
you'd rather fix the issue yourself.

Paul
diff --git a/debian/changelog b/debian/changelog
index 4c6bd9e..b2cd026 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+djangorestframework (3.12.4-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * tests: update for newer pygments (Closes: #1005779)
+
+ -- Paul Gevers   Sun, 13 Mar 2022 19:19:52 +0100
+
 djangorestframework (3.12.4-2) unstable; urgency=medium
 
   * debian/rules
diff --git a/debian/patches/series b/debian/patches/series
index 67355cd..0a97bd1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0002-Clean-all-privacy-breaches-in-the-package.patch
 0002-Fix-asset-names-to-match-symlinks-to-packaged-files.patch
 0003-Fix-tests-with-mock-timezone-7911.patch
+tests-update-for-newer-pygments.patch
diff --git a/debian/patches/tests-update-for-newer-pygments.patch 
b/debian/patches/tests-update-for-newer-pygments.patch
new file mode 100644
index 000..b55900e
--- /dev/null
+++ b/debian/patches/tests-update-for-newer-pygments.patch
@@ -0,0 +1,38 @@
+From: Paul Gevers 
+Date: Sun, 13 Mar 2022 17:12:30 +0100
+X-Dgit-Generated: 3.12.4-2.1 3e10ec7e98630c1f46952ca1d9b26237187c6c52
+Subject: tests: update for newer pygments
+
+Closes: #1005779
+
+---
+
+--- djangorestframework-3.12.4.orig/tests/test_description.py
 djangorestframework-3.12.4/tests/test_description.py
+@@ -45,12 +45,20 @@ MARKDOWN_BASE = """hash style header%s"""
+ 
+ MARKDOWN_gte_33 = """
+-[{\
+-alpha:\
+- 1,\
+-beta: this\
+- is a \
+-string}]\
++[{\
++\
++alpha:\
++ \
++1,\
++\
++beta: \
++this\
++ is\
++ a\
++ \
++stri\
++ng\
++}]\
+ 
+ """
+ 


Bug#1005779: djangorestframework: autopkgtest needs update for new version of pygments

2022-02-14 Thread Paul Gevers

Source: djangorestframework
Version: 3.12.4-2
Severity: serious
X-Debbugs-CC: debian...@lists.debian.org, pygme...@packages.debian.org
Tags: sid bookworm
User: debian...@lists.debian.org
Usertags: needs-update
Control: affects -1 src:pygments

Dear maintainer(s),

With a (not so) recent upload of pygments the autopkgtest of 
djangorestframework fails in testing when that autopkgtest is run with 
the binary packages of pygments from unstable. It passes when run with 
only packages from testing. In tabular form:


   passfail
pygments   from testing2.10.0+dfsg-1
djangorestframeworkfrom testing3.12.4-2
all others from testingfrom testing

I copied some of the output at the bottom of this report.

Currently this regression is blocking the migration of pygments to 
testing [1]. Of course, pygments shouldn't just break your autopkgtest 
(or even worse, your package), but it seems to me that the change in 
pygments was intended and your package needs to update to the new situation.


If this is a real problem in your package (and not only in your 
autopkgtest), the right binary package(s) from pygments should really 
add a versioned Breaks on the unfixed version of (one of your) 
package(s). Note: the Breaks is nice even if the issue is only in the 
autopkgtest as it helps the migration software to figure out the right 
versions to combine in the tests.


More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[1] https://qa.debian.org/excuses.php?package=pygments

https://ci.debian.net/data/autopkgtest/testing/amd64/d/djangorestframework/19192844/log.gz

=== FAILURES 
===
__ TestViewNamesAndDescriptions.test_markdown 
__


self = testMethod=test_markdown>


@pytest.mark.skipif(not apply_markdown, reason="Markdown is not 
installed")

def test_markdown(self):
"""
Ensure markdown to HTML works as expected.
"""
# Markdown 3.3 is only supported on Python 3.6 and higher
if sys.version_info >= (3, 6):

  assert apply_markdown(DESCRIPTION) == MARKDOWN_BASE % MARKDOWN_gte_33
E   AssertionError: assert ''
E Skipping 445 identical leading characters in diff, use -v 
to show
E - an class="nt">beta: class="err">this is class="err">a stringclass="p">}]
E + an class="s2">beta: class="kc">this class="err">is a class="err">strclass="err">inclass="err">gE E ...Full output truncated (2 lines hidden), 
use '-vv' to show


tests/test_description.py:170: AssertionError


OpenPGP_signature
Description: OpenPGP digital signature