Accepting request 1031837 from devel:languages:python
- Add Fix-tests-for-Sphinx-5.3.0.patch to make the package compatible with Sphinx 5.3.0 OBS-URL: https://build.opensuse.org/request/show/1031837 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-breathe?expand=0&rev=18
This commit is contained in:
commit
22d0634eea
43
Fix-tests-for-Sphinx-5.3.0.patch
Normal file
43
Fix-tests-for-Sphinx-5.3.0.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From de3504c81c7cefc87c8229743f93232ca00a685d 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.38.0
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 28 06:53:44 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Add Fix-tests-for-Sphinx-5.3.0.patch to make the package compatible with
|
||||
Sphinx 5.3.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 25 12:46:34 UTC 2022 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
|
@ -25,6 +25,8 @@ Summary: Sphinx Doxygen renderer
|
||||
License: BSD-3-Clause
|
||||
URL: https://github.com/michaeljones/breathe
|
||||
Source: https://github.com/michaeljones/%{modname}/archive/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM Fix-tests-for-Sphinx-5.3.0.patch gh#breathe-doc/breathe#865
|
||||
Patch0: Fix-tests-for-Sphinx-5.3.0.patch
|
||||
BuildRequires: %{python_module Sphinx >= 4.0}
|
||||
BuildRequires: %{python_module docutils >= 0.12}
|
||||
BuildRequires: %{python_module pytest}
|
||||
|
Loading…
Reference in New Issue
Block a user