From 053ce84ac86386fbfc6a8e8895cbffb6c90dfe8e4ab38a18b886758b539420df Mon Sep 17 00:00:00 2001 From: Nico Krapp Date: Fri, 12 Sep 2025 08:04:55 +0000 Subject: [PATCH] - Add upstream patches to fix tests with Python 3.14: * autodoc.patch * autosummary.patch * typing.patch - Proactively add upstream patch to fix tests with docutils 0.22: * docutils022.patch - Rename multibuild flavor 'test' to 'test+doc' to better reflect the current behaviour OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=288 --- .gitattributes | 26 + .gitignore | 1 + _multibuild | 3 + autodoc.patch | 33 + autosummary.patch | 29 + docutils022.patch | 50 + python-Sphinx.changes | 4438 +++++++++++++++++++++++++++++++++++++++++ python-Sphinx.keyring | 99 + python-Sphinx.spec | 379 ++++ python3.inv | 3 + readthedocs.inv | 3 + requests.inv | Bin 0 -> 2274 bytes sphinx-8.2.3.tar.gz | 3 + typing.patch | 40 + update-intersphinx.sh | 5 + 15 files changed, 5112 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 autodoc.patch create mode 100644 autosummary.patch create mode 100644 docutils022.patch create mode 100644 python-Sphinx.changes create mode 100644 python-Sphinx.keyring create mode 100644 python-Sphinx.spec create mode 100644 python3.inv create mode 100644 readthedocs.inv create mode 100644 requests.inv create mode 100644 sphinx-8.2.3.tar.gz create mode 100644 typing.patch create mode 100644 update-intersphinx.sh diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..06c9c02 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,26 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +## Specific LFS patterns +python3.inv filter=lfs diff=lfs merge=lfs -text +readthedocs.inv filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..68c43ce --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test+doc + diff --git a/autodoc.patch b/autodoc.patch new file mode 100644 index 0000000..ccf4b15 --- /dev/null +++ b/autodoc.patch @@ -0,0 +1,33 @@ +From 0227606e71dc765ed60cd0ad2c580a43b5ffca4f Mon Sep 17 00:00:00 2001 +From: James Addison <55152140+jayaddison@users.noreply.github.com> +Date: Mon, 12 May 2025 16:52:52 +0000 +Subject: [PATCH] Fix tests for Python 3.14.0a7 (#13527) + +Authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com> +Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com> +Co-authored-by: James Addison <55152140+jayaddison@users.noreply.github.com> +--- + tests/test_extensions/test_ext_autodoc.py | 6 +++++- + tests/test_extensions/test_ext_autodoc_configs.py | 12 ++++++++++-- + 2 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/tests/test_extensions/test_ext_autodoc.py b/tests/test_extensions/test_ext_autodoc.py +index a06c1bbe30d..7aa12db3c32 100644 +--- a/tests/test_extensions/test_ext_autodoc.py ++++ b/tests/test_extensions/test_ext_autodoc.py +@@ -938,10 +938,14 @@ def test_autodoc_special_members(app): + } + if sys.version_info >= (3, 13, 0, 'alpha', 5): + options['exclude-members'] = '__static_attributes__,__firstlineno__' ++ if sys.version_info >= (3, 14, 0, 'alpha', 7): ++ ann_attr_name = '__annotations_cache__' ++ else: ++ ann_attr_name = '__annotations__' + actual = do_autodoc(app, 'class', 'target.Class', options) + assert list(filter(lambda l: '::' in l, actual)) == [ + '.. py:class:: Class(arg)', +- ' .. py:attribute:: Class.__annotations__', ++ f' .. py:attribute:: Class.{ann_attr_name}', + ' .. py:attribute:: Class.__dict__', + ' .. py:method:: Class.__init__(arg)', + ' .. py:attribute:: Class.__module__', diff --git a/autosummary.patch b/autosummary.patch new file mode 100644 index 0000000..269324f --- /dev/null +++ b/autosummary.patch @@ -0,0 +1,29 @@ +From 8962398b761c3d85a7c74b6f789b3ffb127bde0c Mon Sep 17 00:00:00 2001 +From: Adam Turner <9087854+AA-Turner@users.noreply.github.com> +Date: Thu, 6 Mar 2025 16:03:44 +0000 +Subject: [PATCH] autosummary: Update test for Python 3.14.0a5+ (#13418) + +`types.UnionType` and `typing.Union` have been merged. +--- + tests/test_extensions/test_ext_autosummary.py | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/tests/test_extensions/test_ext_autosummary.py b/tests/test_extensions/test_ext_autosummary.py +index 35dc7d180ef..c807ddba3d1 100644 +--- a/tests/test_extensions/test_ext_autosummary.py ++++ b/tests/test_extensions/test_ext_autosummary.py +@@ -447,8 +447,12 @@ def test_autosummary_generate_content_for_module_imported_members(app): + ] + assert context['functions'] == ['bar'] + assert context['all_functions'] == ['_quux', 'bar'] +- assert context['classes'] == ['Class', 'Foo'] +- assert context['all_classes'] == ['Class', 'Foo', '_Baz'] ++ if sys.version_info >= (3, 14, 0, 'alpha', 5): ++ assert context['classes'] == ['Class', 'Foo', 'Union'] ++ assert context['all_classes'] == ['Class', 'Foo', 'Union', '_Baz'] ++ else: ++ assert context['classes'] == ['Class', 'Foo'] ++ assert context['all_classes'] == ['Class', 'Foo', '_Baz'] + assert context['exceptions'] == ['Exc'] + assert context['all_exceptions'] == ['Exc', '_Exc'] + assert context['attributes'] == ['CONSTANT1', 'qux', 'quuz', 'non_imported_member'] diff --git a/docutils022.patch b/docutils022.patch new file mode 100644 index 0000000..4d12ccf --- /dev/null +++ b/docutils022.patch @@ -0,0 +1,50 @@ +From 68d56109ff50dd81dd31d4a01e3dccbd006c50ee Mon Sep 17 00:00:00 2001 +From: James Addison <55152140+jayaddison@users.noreply.github.com> +Date: Mon, 2 Jun 2025 22:02:48 +0000 +Subject: [PATCH] Tests: update LaTeX label test expectations from Docutils + r10151 (#13610) + +Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> +--- + tests/test_builders/test_build_latex.py | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/tests/test_builders/test_build_latex.py b/tests/test_builders/test_build_latex.py +index 0d1c607462d..37e708a021e 100644 +--- a/tests/test_builders/test_build_latex.py ++++ b/tests/test_builders/test_build_latex.py +@@ -12,6 +12,7 @@ + from subprocess import CalledProcessError + from typing import TYPE_CHECKING + ++import docutils + import pygments + import pytest + +@@ -1959,10 +1960,16 @@ def test_latex_labels(app: SphinxTestApp) -> None: + + result = (app.outdir / 'projectnamenotset.tex').read_text(encoding='utf8') + ++ # ref: docutils r10151 ++ if docutils.__version_info__[:2] < (0, 22): ++ figure_id, table_id = 'id1', 'id2' ++ else: ++ figure_id, table_id = 'id2', 'id3' ++ + # figures + assert ( + r'\caption{labeled figure}' +- r'\label{\detokenize{index:id1}}' ++ r'\label{\detokenize{index:' + figure_id + '}}' + r'\label{\detokenize{index:figure2}}' + r'\label{\detokenize{index:figure1}}' + r'\end{figure}' +@@ -1988,7 +1995,7 @@ def test_latex_labels(app: SphinxTestApp) -> None: + # tables + assert ( + r'\sphinxcaption{table caption}' +- r'\label{\detokenize{index:id2}}' ++ r'\label{\detokenize{index:' + table_id + '}}' + r'\label{\detokenize{index:table2}}' + r'\label{\detokenize{index:table1}}' + ) in result diff --git a/python-Sphinx.changes b/python-Sphinx.changes new file mode 100644 index 0000000..4f9fc4f --- /dev/null +++ b/python-Sphinx.changes @@ -0,0 +1,4438 @@ +------------------------------------------------------------------- +Thu Sep 11 08:42:26 UTC 2025 - Markéta Machová + +- Add upstream patches to fix tests with Python 3.14: + * autodoc.patch + * autosummary.patch + * typing.patch +- Proactively add upstream patch to fix tests with docutils 0.22: + * docutils022.patch +- Rename multibuild flavor 'test' to 'test+doc' to better reflect + the current behaviour + +------------------------------------------------------------------- +Mon Aug 25 12:56:50 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems + +------------------------------------------------------------------- +Fri Mar 14 12:12:22 UTC 2025 - Markéta Machová + +- Update to 8.2.3 + * Correct spelling of highlighting_failure in warning sub-type. + * Restore support for using sphinx.testing.path paths with + sphinx.testing.fixtures + * viewcode: Fix importing modules more than once. + * Fix argument type for jieba.load_userdict(). + * Add workaround for nbsphinx implicit imports. + * Ensure inline + + {{ super() }} + {%- endblock %} + + .. _sphinxcontrib.jquery: https://github.com/sphinx-contrib/jquery/ + Patch by Adam Turner. + * #10471, #10565: Removed deprecated APIs scheduled for removal in Sphinx 6.0. See + :ref:`dev-deprecated-apis` for details. Patch by Adam Turner. + * #10901: C Domain: Remove support for parsing pre-v3 style type directives and + roles. Also remove associated configuration variables ``c_allow_pre_v3`` and + ``c_warn_on_allowed_pre_v3``. Patch by Adam Turner. + * #10924: LaTeX: adopt better looking defaults for tables and code-blocks. + See :confval:`latex_table_style` and the ``pre_border-radius`` and + ``pre_background-TeXcolor`` :ref:`additionalcss` for the former defaults + and how to re-enact them if desired. + * #10984: LaTeX: Document :confval:`latex_additional_files` behavior for files + with ``.tex`` extension. + +------------------------------------------------------------------- +Sun Oct 16 14:43:01 UTC 2022 - Martin Liška + +- Update to version 5.3.0 + * #10759: LaTeX: add :confval:`latex_table_style` and support the + ``'booktabs'``, ``'borderless'``, and ``'colorrows'`` styles. + (thanks to Stefan Wiehler for initial pull requests #6666, #6671) + * #10840: One can cross-reference including an option value like ``:option:`--module=foobar```, + ``:option:`--module[=foobar]``` or ``:option:`--module foobar```. + Patch by Martin Liska. + * #10881: autosectionlabel: Record the generated section label to the debug log. + * #10268: Correctly URI-escape image filenames. + * #10887: domains: Allow sections in all the content of all object description + directives (e.g. :rst:dir:`py:function`). Patch by Adam Turner + +------------------------------------------------------------------- +Sun Oct 2 18:47:20 UTC 2022 - Markéta Machová + +- BuildRequires just flit-core instead of flit + +------------------------------------------------------------------- +Fri Sep 30 18:06:55 UTC 2022 - Martin Liška + +- Update to version 5.2.3 + * #10878: Fix base64 image embedding in sphinx.ext.imgmath + * #10886: Add :nocontentsentry: flag and global domain table of contents entry + control option. Patch by Adam Turner + +------------------------------------------------------------------- +Tue Sep 27 15:35:11 UTC 2022 - Martin Liška + +- Update to version 5.2.2 + * #10872: Restore link targets for autodoc modules to the top of content. + Patch by Dominic Davis-Foster. + +------------------------------------------------------------------- +Mon Sep 26 07:06:34 UTC 2022 - Martin Liška + +- Update to version 5.2.1 + * #10861: Always normalise the ``pycon3`` lexer to ``pycon``. + * Fix using ``sphinx.ext.autosummary`` with modules containing titles in the + module-level docstring. +- Remove unneeded spec hunks. + +------------------------------------------------------------------- +Sun Sep 25 15:24:42 UTC 2022 - Martin Liška + +- Update to version 5.2.0 + * #10356: Sphinx now uses declarative metadata with pyproject.toml to create packages, + using PyPA’s build project as a build backend. Patch by Adam Turner. + * #10286: C++, support requires clauses not just between the template parameter lists and the declaration. + * #10755: linkcheck: Check the source URL of raw directives that use the url option. + * #10781: Allow ref role to be used with definitions and fields. + * #10717: HTML Search: Increase priority for full title and subtitle matches in search results + * #10718: HTML Search: Save search result score to the HTML element for debugging + * #10673: Make toctree accept ‘genindex’, ‘modindex’ and ‘search’ docnames + * #6316, #10804: Add domain objects to the table of contents. Patch by Adam Turner + * #6692: HTML Search: Include explicit index directive index entries in the search index and search results. Patch by Adam Turner + * #10816: imgmath: Allow embedding images in HTML as base64 + * #10257: C++, ensure consistent non-specialization template argument representation. + * #10729: C++, fix parsing of certain non-type template parameter packs. + * #10715: Revert #10520: “Fix” use of sidebar classes in agogo.css_t + +------------------------------------------------------------------- +Wed Jul 27 06:58:04 UTC 2022 - Martin Liška + +- Update to version 5.1.1 + * #10701: Fix ValueError in the new ``deque`` based ``sphinx.ext.napolean`` + iterator implementation. + * #10702: Restore compatability with third-party builders. + +------------------------------------------------------------------- +Sun Jul 24 17:44:29 UTC 2022 - Martin Liška + +- Update to version 5.1.0 + * #10656: Support `Docutils 0.19`_. Patch by Adam Turner. + * #10467: Deprecated ``sphinx.util.stemmer`` in favour of ``snowballstemmer``. + Patch by Adam Turner. + * #9856: Deprecated ``sphinx.ext.napoleon.iterators``. + * #10444: html theme: Allow specifying multiple CSS files through the ``stylesheet`` + setting in ``theme.conf`` or by setting ``html_style`` to an iterable of strings. + * #10366: std domain: Add support for emphasising placeholders in :rst:dir:`option` + directives through a new :confval:`option_emphasise_placeholders` configuration + option. + * #10439: std domain: Use the repr of some variables when displaying warnings, + making whitespace issues easier to identify. + * #10571: quickstart: Reduce content in the generated ``conf.py`` file. Patch by + Pradyun Gedam. + * #10648: LaTeX: CSS-named-alike additional :ref:`'sphinxsetup' ` + keys allow to configure four separate border-widths, four paddings, four + corner radii, a shadow (possibly inset), colours for border, background, shadow + for each of the code-block, topic, attention, caution, danger, error and warning + directives. + * #10655: LaTeX: Explain non-standard encoding in LatinRules.xdy + * #10599: HTML Theme: Wrap consecutive footnotes in an ``