summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-12-23 12:20:20 +0100
committerMichał Górny <mgorny@gentoo.org>2022-12-23 12:24:56 +0100
commit397592b19dc3350bfb70423f573ce9a40de7d013 (patch)
tree8ec8368b713dd62c24669dbeb96c61bbecce9ceb
parentdev-python/awxkit: Bump to 21.10.2 (diff)
downloadgentoo-397592b19dc3350bfb70423f573ce9a40de7d013.tar.gz
gentoo-397592b19dc3350bfb70423f573ce9a40de7d013.tar.bz2
gentoo-397592b19dc3350bfb70423f573ce9a40de7d013.zip
dev-python/breathe: Backport fix for testing w/ Sphinx 5.3.0
Closes: https://bugs.gentoo.org/887853 Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-python/breathe/breathe-4.34.0.ebuild4
-rw-r--r--dev-python/breathe/files/breathe-4.34.0-sphinx-5.3.0.patch43
2 files changed, 47 insertions, 0 deletions
diff --git a/dev-python/breathe/breathe-4.34.0.ebuild b/dev-python/breathe/breathe-4.34.0.ebuild
index 653ebdf4f02d..dbc0627c69cd 100644
--- a/dev-python/breathe/breathe-4.34.0.ebuild
+++ b/dev-python/breathe/breathe-4.34.0.ebuild
@@ -34,3 +34,7 @@ RDEPEND="
"
distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}"/${P}-sphinx-5.3.0.patch
+)
diff --git a/dev-python/breathe/files/breathe-4.34.0-sphinx-5.3.0.patch b/dev-python/breathe/files/breathe-4.34.0-sphinx-5.3.0.patch
new file mode 100644
index 000000000000..52c65b99ec4a
--- /dev/null
+++ b/dev-python/breathe/files/breathe-4.34.0-sphinx-5.3.0.patch
@@ -0,0 +1,43 @@
+From 877d88e5aecd1d39978a46fe7f3df35474d7cd8d Mon Sep 17 00:00:00 2001
+From: Daniel Garcia Moreno <daniel.garcia@suse.com>
+Date: Fri, 28 Oct 2022 08:45:33 +0200
+Subject: [PATCH] Fix tests for Sphinx 5.3.0
+
+Fix https://github.com/breathe-doc/breathe/issues/863
+---
+ tests/test_renderer.py | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test_renderer.py b/tests/test_renderer.py
+index 1688981..a858c65 100644
+--- a/tests/test_renderer.py
++++ b/tests/test_renderer.py
+@@ -109,6 +109,12 @@ class WrappedCompoundDef(compounddefTypeSub, WrappedDoxygenNode):
+ WrappedDoxygenNode.__init__(self, compounddefTypeSub, **kwargs)
+
+
++class MockMemo:
++ def __init__(self):
++ self.title_styles = ""
++ self.section_level = ""
++
++
+ class MockState:
+ def __init__(self, app):
+ from breathe.project import ProjectInfoFactory
+@@ -123,7 +129,11 @@ class MockState:
+ settings.env = env
+ self.document = utils.new_document("", settings)
+
+- def nested_parse(self, content, content_offset, contentnode):
++ # In sphinx 5.3.0 the method state.nested_parse is not called directly
++ # so this memo object should exists here
++ self.memo = MockMemo()
++
++ def nested_parse(self, content, content_offset, contentnode, match_titles=1):
+ pass
+
+
+--
+2.39.0
+