summaryrefslogtreecommitdiff
path: root/dev-python/myst-parser
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-04-23 23:59:27 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-04-23 23:59:27 +0100
commite3f21c8aff8a76afe3423721c437a088e9232840 (patch)
treefde2c1906a9787adec106c5d6b708cd60de02c60 /dev-python/myst-parser
parent1f00990debeffd0052c194989d0a02baac23eb96 (diff)
gentoo auto-resync : 23:04:2024 - 23:59:26
Diffstat (limited to 'dev-python/myst-parser')
-rw-r--r--dev-python/myst-parser/Manifest3
-rw-r--r--dev-python/myst-parser/files/myst-parser-2.0.0-sphinx-7.3.patch81
-rw-r--r--dev-python/myst-parser/myst-parser-2.0.0-r1.ebuild24
3 files changed, 90 insertions, 18 deletions
diff --git a/dev-python/myst-parser/Manifest b/dev-python/myst-parser/Manifest
index db768a8401ed..081503273ed6 100644
--- a/dev-python/myst-parser/Manifest
+++ b/dev-python/myst-parser/Manifest
@@ -1,4 +1,5 @@
+AUX myst-parser-2.0.0-sphinx-7.3.patch 3382 BLAKE2B a2a576863f5441533f96095da6c2d0b15cc87a839475d2604e08988bf00275976986b9733a6e1b4037ee8a5a4b64b2f86304532072c92cf00d0943969b32bdaf SHA512 55002133202bc0f8f1f3e13e4fa4b8146369e06c996b54cade49250daa26fa80998bfaba7b1ff0f502196967bc322e863aa8e2194577624f14dd2e0711d9e709
DIST MyST-Parser-2.0.0.gh.tar.gz 815453 BLAKE2B 8f5dd823c3c79d843b45a7a4819d5677b51a12f78db2c1ce9700eb6faa8c4f0bc167fb1d8cd947e89ffab85aec947ab527b67dc73ef4db97a393f700a4331738 SHA512 c47bdd773565e93c4714d318a70f9a8adab1be6e2a63c23175667fc4afb5da4d66b84e11176782c8202e9fd68883e74d444911ddfb0b91356c2ba07fa65f7ea4
DIST myst-parser-2.0.0-sphinx-7.2.patch 22443 BLAKE2B 994f0b2c419832e61cb006b1b45c01274970900bdcfcef3422d5331e88962a46884afbf5b27b5cb98ed349a426444ca4ff21810526cc34eae4cf074102f7b3de SHA512 707b2a69c81352d2900c91088ca137f6455e0006b0e7c798b6f03b9f0cac85489c27db662f5e6ab6e2cd52e10f1594aa54d5c6821c07c110ad138d0cf129ac65
-EBUILD myst-parser-2.0.0-r1.ebuild 2408 BLAKE2B 3f4e599c57642d72e04b3549664945f15ed5674d2135f1b874e7b13c0db674e2d9ced463cba6b0c9f31be45d7e4826c88630ef07500ad92a62336531d4d1aa15 SHA512 813e57062b98269ad82a6252cfbd48ee368b50867445e05130e89eecf02df687c1b443a1b540f3f6e068971d85f7a2639bd19b0d9918c67eb8181d2677abbcd7
+EBUILD myst-parser-2.0.0-r1.ebuild 1975 BLAKE2B 8f3c91fae114855d5948e2568226c1d07b2cb6c36783d4c1f6d6b58c83ba4af05dfdd3a9d10bf8f2e1cf5ea041f4069835d56e890c88c3017aba29b66a088df4 SHA512 5001437c17a09091af41b82384acfbc5356aef2aaff79de5c2c4f3074d2cc6b2b1c201c7b97619aa720b3c767326f2d2067418a30bd0ff2624f391decfce02bc
MISC metadata.xml 406 BLAKE2B d8a974be3dd4fef4800958dcb1eef3124dc8e3ec49e6678d0db7d6096ef290019aa025796c4f7c38bc11b750d1667ba97d4429b64e7271009da707cd945e113f SHA512 acdc27a39e068c487306002342b9c0c5910d61ed34a7b62878272054ea458d5aad46fe24095a52666ed77ffcb6e703687cc83de0c9e2cef395a1decf9003d918
diff --git a/dev-python/myst-parser/files/myst-parser-2.0.0-sphinx-7.3.patch b/dev-python/myst-parser/files/myst-parser-2.0.0-sphinx-7.3.patch
new file mode 100644
index 000000000000..3b9d9551311e
--- /dev/null
+++ b/dev-python/myst-parser/files/myst-parser-2.0.0-sphinx-7.3.patch
@@ -0,0 +1,81 @@
+diff --git a/tests/test_renderers/test_fixtures_sphinx.py b/tests/test_renderers/test_fixtures_sphinx.py
+index bd0f85eb..65aba83a 100644
+--- a/tests/test_renderers/test_fixtures_sphinx.py
++++ b/tests/test_renderers/test_fixtures_sphinx.py
+@@ -22,7 +22,12 @@
+ def test_syntax_elements(file_params, sphinx_doctree_no_tr: CreateDoctree):
+ sphinx_doctree_no_tr.set_conf({"extensions": ["myst_parser"]})
+ result = sphinx_doctree_no_tr(file_params.content, "index.md")
+- file_params.assert_expected(result.pformat("index"), rstrip_lines=True)
++ pformat = result.pformat("index")
++ # changed in docutils 0.20.1
++ pformat = pformat.replace(
++ '<literal classes="code" language="">', '<literal classes="code">'
++ )
++ file_params.assert_expected(pformat, rstrip_lines=True)
+
+
+ @pytest.mark.param_file(FIXTURE_PATH / "sphinx_link_resolution.md")
+@@ -100,6 +105,8 @@ def test_sphinx_directives(file_params, sphinx_doctree_no_tr: CreateDoctree):
+ ),
+ "",
+ )
++ # changed in sphinx 7.3
++ pformat = pformat.replace("Added in version 0.2", "New in version 0.2")
+
+ file_params.assert_expected(pformat, rstrip_lines=True)
+
+diff --git a/tests/test_sphinx/sourcedirs/heading_slug_func/conf.py b/tests/test_sphinx/sourcedirs/heading_slug_func/conf.py
+index f6612b4c..33aed04b 100644
+--- a/tests/test_sphinx/sourcedirs/heading_slug_func/conf.py
++++ b/tests/test_sphinx/sourcedirs/heading_slug_func/conf.py
+@@ -2,5 +2,6 @@
+
+ extensions = ["myst_parser"]
+ exclude_patterns = ["_build"]
++suppress_warnings = ["config.cache"]
+ myst_heading_anchors = 2
+ myst_heading_slug_func = make_id
+diff --git a/tests/test_sphinx/test_sphinx_builds.py b/tests/test_sphinx/test_sphinx_builds.py
+index fcc1e463..b4e7c10d 100644
+--- a/tests/test_sphinx/test_sphinx_builds.py
++++ b/tests/test_sphinx/test_sphinx_builds.py
+@@ -162,7 +162,12 @@ def test_references_singlehtml(
+ docname="other/other",
+ resolve=True,
+ regress=True,
+- replace={"other\\other.md": "other/other.md"},
++ replace={
++ "other\\other.md": "other/other.md",
++ # changed in sphinx 7.3
++ '="#document-index': '="index.html#document-index',
++ '="#document-other': '="index.html#document-other',
++ },
+ )
+
+ get_sphinx_app_output(
+@@ -170,7 +175,12 @@ def test_references_singlehtml(
+ filename="index.html",
+ buildername="singlehtml",
+ regress_html=True,
+- replace={"Permalink to this headline": "Permalink to this heading"},
++ replace={
++ "Permalink to this headline": "Permalink to this heading",
++ # changed in sphinx 7.3
++ '="#document-index': '="index.html#document-index',
++ '="#document-other': '="index.html#document-other',
++ },
+ )
+
+
+@@ -469,7 +479,9 @@ def test_gettext_html(
+ regress_ext=".html",
+ replace={
+ # upstream bug https://github.com/sphinx-doc/sphinx/issues/11689
+- '"Permalink to this heading"': '"Lien permanent vers cette rubrique"'
++ '"Permalink to this heading"': '"Lien permanent vers cette rubrique"',
++ # which was fixed to a different translation in sphinx 7.3
++ '"Lien vers cette rubrique"': '"Lien permanent vers cette rubrique"',
+ },
+ )
+
diff --git a/dev-python/myst-parser/myst-parser-2.0.0-r1.ebuild b/dev-python/myst-parser/myst-parser-2.0.0-r1.ebuild
index 7d5eb87dbe12..4257951ca376 100644
--- a/dev-python/myst-parser/myst-parser-2.0.0-r1.ebuild
+++ b/dev-python/myst-parser/myst-parser-2.0.0-r1.ebuild
@@ -40,6 +40,7 @@ RDEPEND="
BDEPEND="
test? (
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
+ dev-python/defusedxml[${PYTHON_USEDEP}]
<dev-python/linkify-it-py-3[${PYTHON_USEDEP}]
>=dev-python/linkify-it-py-2.0.0[${PYTHON_USEDEP}]
dev-python/pytest-regressions[${PYTHON_USEDEP}]
@@ -56,26 +57,15 @@ src_prepare() {
# https://github.com/executablebooks/MyST-Parser/pull/811
"${DISTDIR}/${P}-sphinx-7.2.patch"
)
+ if has_version '>=dev-python/sphinx-7.3'; then
+ PATCHES+=(
+ # https://github.com/executablebooks/MyST-Parser/pull/915
+ "${FILESDIR}/${P}-sphinx-7.3.patch"
+ )
+ fi
default
# unpin docutils
sed -i -e '/docutils/s:,<[0-9.]*::' pyproject.toml || die
}
-
-python_test() {
- local EPYTEST_DESELECT=()
-
- if has_version ">=dev-python/sphinx-7.3"; then
- EPYTEST_DESELECT+=(
- # https://github.com/executablebooks/MyST-Parser/issues/913
- 'tests/test_renderers/test_fixtures_sphinx.py::test_syntax_elements[298-Sphinx Role containing backtick:]'
- 'tests/test_renderers/test_fixtures_sphinx.py::test_sphinx_directives[341-versionadded (`sphinx.domains.changeset.VersionChange`):]'
- tests/test_sphinx/test_sphinx_builds.py::test_references_singlehtml
- tests/test_sphinx/test_sphinx_builds.py::test_heading_slug_func
- tests/test_sphinx/test_sphinx_builds.py::test_gettext_html
- )
- fi
-
- epytest
-}