From 6ee154f2c39bce04a222c4e69ea3f4af64240fb1ef34db10bdd5007af2035e95 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 15 Mar 2025 11:07:19 +0000 Subject: [PATCH] Accepting request 1253083 from home:mcalabkova:branches:devel:languages:python - Update to 4.36: * Update test_renderer so that tests pass with Sphinx 7.2. * Fix PosixPath issue with Sphinx 7.2. * Avoid RemovedInSphinx80Warning in path-manipulation code. * Require Sphinx 7.2 or later, Python 3.9 or later and Doxygen 1.9.2 or later. * Begin to use pathlib. * Insert signature name for use with Sphinx Table of Contents. * Fix error in template specialization with qualified arguments. - Drop merged support-sphinx-7.2.patch and support-sphinx-7.4.patch. OBS-URL: https://build.opensuse.org/request/show/1253083 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-breathe?expand=0&rev=58 --- breathe-4.35.0.tar.gz | 3 -- breathe-4.36.0.tar.gz | 3 ++ python-breathe.changes | 14 ++++++++ python-breathe.spec | 13 +++----- support-sphinx-7.2.patch | 30 ----------------- support-sphinx-7.4.patch | 72 ---------------------------------------- 6 files changed, 21 insertions(+), 114 deletions(-) delete mode 100644 breathe-4.35.0.tar.gz create mode 100644 breathe-4.36.0.tar.gz delete mode 100644 support-sphinx-7.2.patch delete mode 100644 support-sphinx-7.4.patch diff --git a/breathe-4.35.0.tar.gz b/breathe-4.35.0.tar.gz deleted file mode 100644 index c3c562d..0000000 --- a/breathe-4.35.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:55b54723752fc04b892a0f868782b1df65e69db6ca94fb32cf04be495bfd7841 -size 212932 diff --git a/breathe-4.36.0.tar.gz b/breathe-4.36.0.tar.gz new file mode 100644 index 0000000..63e80dc --- /dev/null +++ b/breathe-4.36.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94fc2277e639929e898cb95559d9d2c51cf764b787eaf6fa04f848a6550c2ff5 +size 219346 diff --git a/python-breathe.changes b/python-breathe.changes index 4c0a1a7..a6305df 100644 --- a/python-breathe.changes +++ b/python-breathe.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Fri Mar 14 12:59:04 UTC 2025 - Markéta Machová + +- Update to 4.36: + * Update test_renderer so that tests pass with Sphinx 7.2. + * Fix PosixPath issue with Sphinx 7.2. + * Avoid RemovedInSphinx80Warning in path-manipulation code. + * Require Sphinx 7.2 or later, Python 3.9 or later + and Doxygen 1.9.2 or later. + * Begin to use pathlib. + * Insert signature name for use with Sphinx Table of Contents. + * Fix error in template specialization with qualified arguments. +- Drop merged support-sphinx-7.2.patch and support-sphinx-7.4.patch. + ------------------------------------------------------------------- Sat Jan 18 10:37:41 UTC 2025 - Matej Cepl diff --git a/python-breathe.spec b/python-breathe.spec index 38bd048..31beaaa 100644 --- a/python-breathe.spec +++ b/python-breathe.spec @@ -18,26 +18,21 @@ %{?sle15_python_module_pythons} Name: python-breathe -Version: 4.35.0 +Version: 4.36.0 Release: 0 Summary: Sphinx Doxygen renderer License: BSD-3-Clause URL: https://github.com/michaeljones/breathe Source: https://github.com/michaeljones/breathe/archive/v%{version}.tar.gz#/breathe-%{version}.tar.gz -Patch0: support-sphinx-7.2.patch -# PATCH-FIX-UPSTREAM support-sphinx-7.4.patch gh#breathe-doc/breathe!1007 mcepl@suse.com -# fix the test suite -Patch1: support-sphinx-7.4.patch -BuildRequires: %{python_module Sphinx >= 4.0} -BuildRequires: %{python_module docutils >= 0.12} +BuildRequires: %{python_module Sphinx >= 7.2} +BuildRequires: %{python_module flit-core} BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-Sphinx >= 4.0 -Requires: python-docutils >= 0.12 +Requires: python-Sphinx >= 7.2 Requires(post): update-alternatives Requires(postun): update-alternatives Provides: python-sphinxcontrib-breathe = %{version} diff --git a/support-sphinx-7.2.patch b/support-sphinx-7.2.patch deleted file mode 100644 index 8159a75..0000000 --- a/support-sphinx-7.2.patch +++ /dev/null @@ -1,30 +0,0 @@ -Index: breathe-4.35.0/tests/test_renderer.py -=================================================================== ---- breathe-4.35.0.orig/tests/test_renderer.py -+++ breathe-4.35.0/tests/test_renderer.py -@@ -35,7 +35,11 @@ def app(test_params, app_params, make_ap - """ - args, kwargs = app_params - assert "srcdir" in kwargs -- kwargs["srcdir"].makedirs(exist_ok=True) -+ try: -+ kwargs["srcdir"].mkdir(parents=True, exist_ok=True) -+ except AttributeError: -+ # old version of Sphinx -+ kwargs["srcdir"].makedirs(exist_ok=True) - (kwargs["srcdir"] / "conf.py").write_text("") - app_ = make_app(*args, **kwargs) - yield app_ -Index: breathe-4.35.0/breathe/project.py -=================================================================== ---- breathe-4.35.0.orig/breathe/project.py -+++ breathe-4.35.0/breathe/project.py -@@ -113,7 +113,7 @@ class ProjectInfoFactory: - # Assume general build directory is the doctree directory without the last component. - # We strip off any trailing slashes so that dirname correctly drops the last part. - # This can be overridden with the breathe_build_directory config variable -- self._default_build_dir = os.path.dirname(app.doctreedir.rstrip(os.sep)) -+ self._default_build_dir = app.doctreedir.parent - self.project_count = 0 - self.project_info_store: Dict[str, ProjectInfo] = {} - self.project_info_for_auto_store: Dict[str, AutoProjectInfo] = {} diff --git a/support-sphinx-7.4.patch b/support-sphinx-7.4.patch deleted file mode 100644 index 90df397..0000000 --- a/support-sphinx-7.4.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 44c113677bbb5c5292f6e69fb9f614334eedcb3e Mon Sep 17 00:00:00 2001 -From: "Eric T. Johnson" -Date: Thu, 16 Jan 2025 11:49:54 -0500 -Subject: [PATCH] Fix tests for Sphinx 7.4 (#1007) - ---- - breathe/file_state_cache.py | 2 ++ - breathe/process.py | 2 ++ - tests/test_renderer.py | 9 +++++---- - 3 files changed, 9 insertions(+), 4 deletions(-) - ---- a/breathe/file_state_cache.py -+++ b/breathe/file_state_cache.py -@@ -1,3 +1,5 @@ -+from __future__ import annotations -+ - from sphinx.application import Sphinx - from sphinx.environment import BuildEnvironment - ---- a/breathe/process.py -+++ b/breathe/process.py -@@ -1,3 +1,5 @@ -+from __future__ import annotations -+ - from breathe.project import AutoProjectInfo, ProjectInfoFactory - - import os ---- a/tests/test_renderer.py -+++ b/tests/test_renderer.py -@@ -40,7 +40,7 @@ def app(test_params, app_params, make_ap - except AttributeError: - # old version of Sphinx - kwargs["srcdir"].makedirs(exist_ok=True) -- (kwargs["srcdir"] / "conf.py").write_text("") -+ (kwargs["srcdir"] / "conf.py").write_text("", encoding="ascii") - app_ = make_app(*args, **kwargs) - yield app_ - -@@ -129,7 +129,7 @@ class MockState: - env.temp_data["docname"] = "mock-doc" - env.temp_data["breathe_project_info_factory"] = ProjectInfoFactory(app) - env.temp_data["breathe_parser_factory"] = DoxygenParserFactory(app) -- settings = frontend.OptionParser(components=(parsers.rst.Parser,)).get_default_values() -+ settings = frontend.get_default_settings(parsers.rst.Parser) - settings.env = env - self.document = utils.new_document("", settings) - -@@ -172,13 +172,14 @@ class MockMaskFactory: - - class MockContext: - def __init__(self, app, node_stack, domain=None, options=[]): -+ from docutils.statemachine import StringList - self.domain = domain - self.node_stack = node_stack - self.directive_args = [ - None, # name - None, # arguments - options, # options -- None, # content -+ StringList([], items=[]), # content - None, # lineno - None, # content_offset - None, # block_text -@@ -564,7 +565,7 @@ def get_matches(datafile): - from xml.dom import minidom - - argsstrings = [] -- with open(os.path.join(os.path.dirname(__file__), "data", datafile)) as fid: -+ with open(os.path.join(os.path.dirname(__file__), "data", datafile), encoding="utf-8") as fid: - xml = fid.read() - doc = minidom.parseString(xml) -