summaryrefslogtreecommitdiff
path: root/dev-python/sphinx
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/sphinx')
-rw-r--r--dev-python/sphinx/Manifest3
-rw-r--r--dev-python/sphinx/files/sphinx-7.3.7-opt-defusedxml.patch34
-rw-r--r--dev-python/sphinx/sphinx-7.3.7-r2.ebuild (renamed from dev-python/sphinx/sphinx-7.3.7-r1.ebuild)7
3 files changed, 38 insertions, 6 deletions
diff --git a/dev-python/sphinx/Manifest b/dev-python/sphinx/Manifest
index ad4b97e5cab7..280ab15775cb 100644
--- a/dev-python/sphinx/Manifest
+++ b/dev-python/sphinx/Manifest
@@ -1,7 +1,8 @@
AUX sphinx-3.2.1-doc-link.patch 604 BLAKE2B f23f8f9a0a48b170e2b6daaeded1e65aebe830da463d4e30f2405b511cb72dde12767d0113b2d1efdce821c16837d700c71c60de38d20950ca5d6579f19a80ff SHA512 3088ba8768b4ba9e6a187e4c52fcc226efd5125fd01526b4a724504f4c445d69d6964fe79c1325ff7f58edcefc7f3489393ab085ea0458d94c44b186aa16e2f1
AUX sphinx-4.3.2-doc-link.patch 745 BLAKE2B 94f190d63168be99c4719a917f0a1210c56284c278c3909d9de34a319b4d5afa2337133509c06f87e53d5ae488efd88b0f79542719e8870c137f160732c25189 SHA512 aed97412a49212856ea6ccb392c2aa210862ec25d49c4b81a7ff17bd2d0cfe4811d80f4047622f7b23473e31aad968c34098b590045c1d0592b19f4cb6ec8b3c
+AUX sphinx-7.3.7-opt-defusedxml.patch 1427 BLAKE2B a28078b9ec5304b4c1fba687b83b2260a8edc1cbbcb75b542aec8fa8d6c122780a99686e840c515df4d83d5c7451c5f39bdb0107fe908e31ccbbce2f7430329a SHA512 46d1abda3fde606e663c129af2ebec055e80fb7ad71afb30e85518ddd2f9da6cfd9e72d34473790ca161997bd937a8cf0303f19cb45b8a524617bd3dc9e03d92
DIST sphinx-7.2.6.gh.tar.gz 7067425 BLAKE2B 4da1cb5ccebea4df0dc134c552311d7b70ce9b76424ea4355ad67b1ece60c9b445e56c96b838832d4df2f50940832b3fa9555b596390464a4017a573bcf514c3 SHA512 204e859318ad5044639f2e682098b07c7cc675b54ba801feeb3322290bfd15316cc15a2cae8fa6a55e6ec6d1e9690790e5402652eb04720bfe96e172f4c8bdbc
DIST sphinx-7.3.7.gh.tar.gz 7165383 BLAKE2B bcc68f26937e6aefe60cedea533a5c8e245c76b59ab4913fb6516f285e3afc32be60b336c662ac8305fb88e82fcc2b477128f2d8b9bf92f037b124f4c855df2a SHA512 540553ecddc55b3e673c79bc776a899d2c660f1e93ef819711be52174accf5b70465883a46bed81d163534e56718caf0765b4bae153e9307a3792387d8228df5
EBUILD sphinx-7.2.6.ebuild 4353 BLAKE2B 4e6f4767fd2b2f7de9174a745fc40c926af6acd89f62423bfa284721601a95c95694472e7b77be2a029860625821b33f11049c151cfd5c04e23a85c06a7def40 SHA512 73efc9db67471cc131fcaec408545dfdea8a04122efa57878062964d2b887fc2e8c6f5cca0d34ee321feaf9d1a77e72cd2ff4db8c0a5d7d2318fd7012d7865ab
-EBUILD sphinx-7.3.7-r1.ebuild 4705 BLAKE2B 594c4c31698e32f9c5e8ec78d166bb46546599be0dcf41172409a2417e22f9740f3d1b6d56e87cdca9602b279e99101d3e02a8de2e8d05397d22ec7311644f50 SHA512 af8f5ce054d5b642bb62cef4642a1465fe1643d9345b5776d24281ebfcbb03ee424d01b99670efc01f055cf17c7f32e4966d2980fc618ea0f86b984f79c50e3a
+EBUILD sphinx-7.3.7-r2.ebuild 4619 BLAKE2B fa6834d66d55f3bfdcb15908522b2ea1ef83220f18f63ebda697a657a776e88fc4a1b92842782f46afe6c01f738f87b22b8a529323c0a6b35ba38556f30bdf38 SHA512 b996ba6087c1ae689a4ad17b79dd138376786da5e6e49e6776a188573c9317b34962264c42d8c9a5bb508c5162c76801ae65eaec2c0a4f475df98507b696c563
MISC metadata.xml 568 BLAKE2B ddb7175070df6da4088813cc6b66f25bb4364e2619b1e7da94370f7ce8e73b68b12f618412f81e6be57fcb0c60c10e3913f26a6a578b0f9defa7b9ee8091fcde SHA512 d32b37cbe88f5e3db0c6968bc7aa22c7edfb3794bf7c62facd17e7ae1f4f0fbfc7c9f5512230cce16ed32e2ebb70c23dfe9b36ce38785c5f5b76585410313214
diff --git a/dev-python/sphinx/files/sphinx-7.3.7-opt-defusedxml.patch b/dev-python/sphinx/files/sphinx-7.3.7-opt-defusedxml.patch
new file mode 100644
index 000000000000..cb70e2cf89fc
--- /dev/null
+++ b/dev-python/sphinx/files/sphinx-7.3.7-opt-defusedxml.patch
@@ -0,0 +1,34 @@
+From ce86026f3b667949ef39f7fdab9a40941d99c5ca Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 11 May 2024 18:31:02 +0200
+Subject: [PATCH] DEPS: Lazy import `defusedxml` only when necessary (#12362)
+
+The `defusedxml` dependency was added to `sphinx.testing` in sphinx 7.3,
+but it is not part of the core sphinx dependencies, and not strictly necessary for the running of the pytest plugin.
+This commit moves the import into the only function which uses it,
+so that the pytest plugins can be used again without this dependency.
+---
+ sphinx/testing/util.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/sphinx/testing/util.py b/sphinx/testing/util.py
+index d1de8ea2b7..b2df709eea 100644
+--- a/sphinx/testing/util.py
++++ b/sphinx/testing/util.py
+@@ -11,7 +11,6 @@
+ from types import MappingProxyType
+ from typing import TYPE_CHECKING
+
+-from defusedxml.ElementTree import parse as xml_parse
+ from docutils import nodes
+ from docutils.parsers.rst import directives, roles
+
+@@ -73,6 +72,8 @@ def assert_node(node: Node, cls: Any = None, xpath: str = "", **kwargs: Any) ->
+ # keep this to restrict the API usage and to have a correct return type
+ def etree_parse(path: str | os.PathLike[str]) -> ElementTree:
+ """Parse a file into a (safe) XML element tree."""
++ from defusedxml.ElementTree import parse as xml_parse
++
+ return xml_parse(path)
+
+
diff --git a/dev-python/sphinx/sphinx-7.3.7-r1.ebuild b/dev-python/sphinx/sphinx-7.3.7-r2.ebuild
index 4151e90e6efc..99ff0e4980f7 100644
--- a/dev-python/sphinx/sphinx-7.3.7-r1.ebuild
+++ b/dev-python/sphinx/sphinx-7.3.7-r2.ebuild
@@ -52,11 +52,6 @@ RDEPEND="
)
!dev-python/namespace-sphinxcontrib
"
-# added temporarily because of unconditional import in sphinx.testing.util
-# until we figure out how to deal with it better
-RDEPEND+="
- dev-python/defusedxml[${PYTHON_USEDEP}]
-"
BDEPEND="
doc? (
dev-python/sphinxcontrib-websupport[${PYTHON_USEDEP}]
@@ -77,6 +72,8 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/sphinx-3.2.1-doc-link.patch"
"${FILESDIR}/sphinx-4.3.2-doc-link.patch"
+ # https://github.com/sphinx-doc/sphinx/pull/12362
+ "${FILESDIR}/${P}-opt-defusedxml.patch"
)
distutils_enable_tests pytest