diff -Nru myst-parser-0.16.1/debian/changelog myst-parser-0.16.1/debian/changelog --- myst-parser-0.16.1/debian/changelog 2022-01-11 03:09:37.000000000 +0000 +++ myst-parser-0.16.1/debian/changelog 2022-02-19 23:56:21.000000000 +0000 @@ -1,3 +1,19 @@ +myst-parser (0.16.1-3) unstable; urgency=medium + + * Team upload. + * Fix a backporting mistake in the 32-bit-test-failure patch. + * Correct changelog entry for -2, it was a team upload. + + -- Stefano Rivera Sat, 19 Feb 2022 19:56:21 -0400 + +myst-parser (0.16.1-2) unstable; urgency=medium + + * Team upload. + * Patch: Fix test failure on 32-bit platforms. (Closes: #1005691) + * Patch: Support pygments 2.11 in tests. + + -- Stefano Rivera Sat, 19 Feb 2022 19:36:03 -0400 + myst-parser (0.16.1-1) unstable; urgency=medium * New upstream release. diff -Nru myst-parser-0.16.1/debian/patches/32-bit-test-failure myst-parser-0.16.1/debian/patches/32-bit-test-failure --- myst-parser-0.16.1/debian/patches/32-bit-test-failure 1970-01-01 00:00:00.000000000 +0000 +++ myst-parser-0.16.1/debian/patches/32-bit-test-failure 2022-02-19 23:56:21.000000000 +0000 @@ -0,0 +1,50 @@ +From: Stefano Rivera +Date: Sat, 19 Feb 2022 15:01:28 -0400 +Subject: Massage test output on 32-bit systems to match 64-bit systems + +Fixes test_sphinx_directives[35-highlight (sphinx.directives.code.Highlight):] +which was failing on 32-bit platforms due to linenothreshold defaulting +to sys.maxsize. + +Fixes: #522 +Bug-Debian: https://bugs.debian.org/1005691 +Bug-Upstream: https://github.com/executablebooks/MyST-Parser/issues/522 +Forwarded: https://github.com/executablebooks/MyST-Parser/pull/523 +--- + tests/test_renderers/test_fixtures.py | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/tests/test_renderers/test_fixtures.py b/tests/test_renderers/test_fixtures.py +index 7771a55..bb54573 100644 +--- a/tests/test_renderers/test_fixtures.py ++++ b/tests/test_renderers/test_fixtures.py +@@ -1,4 +1,5 @@ + import re ++import sys + from pathlib import Path + + import pytest +@@ -112,15 +113,20 @@ def test_sphinx_directives(line, title, input, expected): + pytest.skip(title) + elif title.startswith("SPHINX4") and sphinx.version_info[0] < 4: + pytest.skip(title) +- document = to_docutils(input, in_sphinx_env=True) ++ document = to_docutils(input, in_sphinx_env=True).pformat() ++ ++ # see https://github.com/executablebooks/MyST-Parser/issues/522 ++ if sys.maxsize == 2147483647: ++ document = document.replace('"2147483647"', '"9223372036854775807"') ++ + _actual, _expected = [ + "\n".join([ll.rstrip() for ll in text.splitlines()]) +- for text in (document.pformat(), expected) ++ for text in (document, expected) + ] + try: + assert _actual == _expected + except AssertionError: +- print(document.pformat()) ++ print(document) + raise + + diff -Nru myst-parser-0.16.1/debian/patches/pygments-2.11 myst-parser-0.16.1/debian/patches/pygments-2.11 --- myst-parser-0.16.1/debian/patches/pygments-2.11 1970-01-01 00:00:00.000000000 +0000 +++ myst-parser-0.16.1/debian/patches/pygments-2.11 2022-02-19 23:56:21.000000000 +0000 @@ -0,0 +1,31 @@ +From: Chris Sewell +Date: Fri, 31 Dec 2021 01:34:10 +0100 +Subject: Support pygments 2.11 +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit + +From a change within: + +> 🐛 FIX: Ordered list starting number (#483) +> Propagate the starting number of ordered lists to the docutils AST. + +Origin: upstream, https://github.com/executablebooks/MyST-Parser/commit/feff225368a9c66d231ab8ce778e9b81f4dc85f1 +--- + tests/test_sphinx/conftest.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tests/test_sphinx/conftest.py b/tests/test_sphinx/conftest.py +index 0f2b287..950970e 100644 +--- a/tests/test_sphinx/conftest.py ++++ b/tests/test_sphinx/conftest.py +@@ -83,6 +83,9 @@ def get_sphinx_app_output(file_regression): + # only regress the inner body, since other sections are non-deterministic + soup = BeautifulSoup(content, "html.parser") + doc_div = soup.findAll("div", {"class": "documentwrapper"})[0] ++ # pygments 2.11.0 introduces a whitespace tag ++ for pygment_whitespace in doc_div.select("pre > span.w"): ++ pygment_whitespace.replace_with(pygment_whitespace.text) + text = doc_div.prettify() + for find, rep in (replace or {}).items(): + text = text.replace(find, rep) diff -Nru myst-parser-0.16.1/debian/patches/series myst-parser-0.16.1/debian/patches/series --- myst-parser-0.16.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ myst-parser-0.16.1/debian/patches/series 2022-02-19 23:56:21.000000000 +0000 @@ -0,0 +1,2 @@ +32-bit-test-failure +pygments-2.11