Compare commits

..

8 Commits

Author SHA1 Message Date
jinqiang zhang aa618ab186 disable test 2026-03-02 18:11:11 +08:00
Karolina Surma 65dfddcee3 Fix compatibility with Sphinx 9+ 2026-02-12 09:31:53 +01:00
Fedora Release Engineering 4791038f5d Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 09:57:02 +00:00
Python Maint bae9b54cde Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 14:29:53 +02:00
Python Maint be980d7523 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 14:54:59 +02:00
Fedora Release Engineering 7502779cea Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 10:34:46 +00:00
Python Maint f565451a95 Rebuilt for Python 3.14 2025-06-05 00:32:31 +02:00
Fedora Release Engineering c1497aa6ed Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 19:41:08 +00:00
2 changed files with 93 additions and 3 deletions
+88
View File
@@ -0,0 +1,88 @@
From 93a6da5b7f6a782eef16e9dc9ade1558f7e7c982 Mon Sep 17 00:00:00 2001
From: Dmitry Shachnev <mitya57@gmail.com>
Date: Sat, 31 Jan 2026 15:27:46 +0300
Subject: [PATCH] Support Sphinx 9
---
sphinxcontrib/websupport/builder.py | 13 +++++--------
tests/roots/test-root/root/markup.txt | 2 +-
tests/roots/test-searchadapters/markup.txt | 4 ++--
3 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/sphinxcontrib/websupport/builder.py b/sphinxcontrib/websupport/builder.py
index a00d0ff..f5d6f0f 100644
--- a/sphinxcontrib/websupport/builder.py
+++ b/sphinxcontrib/websupport/builder.py
@@ -9,8 +9,6 @@ import posixpath
import shutil
from typing import TYPE_CHECKING, Any
-from docutils.io import StringOutput
-
from sphinx.jinja2glue import BuiltinTemplateLoader
from sphinx.util.osutil import os_path, relative_uri, ensuredir, copyfile
from sphinxcontrib.serializinghtml import PickleHTMLBuilder
@@ -79,7 +77,6 @@ class WebSupportBuilder(PickleHTMLBuilder):
self.globalcontext['no_search_suffix'] = True
def write_doc(self, docname: str, doctree: nodes.document) -> None:
- destination = StringOutput(encoding='utf-8')
doctree.settings = self.docsettings
self.secnumbers = self.env.toc_secnumbers.get(docname, {})
@@ -87,12 +84,12 @@ class WebSupportBuilder(PickleHTMLBuilder):
self.imgpath = '/' + posixpath.join(self.virtual_staticdir, self.imagedir)
self.dlpath = '/' + posixpath.join(self.virtual_staticdir, '_downloads')
self.current_docname = docname
- self.docwriter.write(doctree, destination)
- self.docwriter.assemble_parts()
- body = self.docwriter.parts['fragment']
- metatags = self.docwriter.clean_meta
+ visitor = self.create_translator(doctree, self)
+ doctree.walkabout(visitor)
+ body = ''.join(visitor.fragment)
+ clean_meta = ''.join(visitor.meta[2:])
- ctx = self.get_doc_context(docname, body, metatags)
+ ctx = self.get_doc_context(docname, body, clean_meta)
self.handle_page(docname, ctx, event_arg=doctree)
def write_doc_serialized(self, docname: str, doctree: nodes.Node) -> None:
diff --git a/tests/roots/test-root/root/markup.txt b/tests/roots/test-root/root/markup.txt
index 714dabe..668e6bd 100644
--- a/tests/roots/test-root/root/markup.txt
+++ b/tests/roots/test-root/root/markup.txt
@@ -369,7 +369,7 @@ Index markup
pair: entry; pair
double: entry; double
triple: index; entry; triple
- keyword: with
+ pair: keyword; with
see: from; to
seealso: fromalso; toalso
diff --git a/tests/roots/test-searchadapters/markup.txt b/tests/roots/test-searchadapters/markup.txt
index 77f245a..e0fb6c2 100644
--- a/tests/roots/test-searchadapters/markup.txt
+++ b/tests/roots/test-searchadapters/markup.txt
@@ -377,7 +377,7 @@ Index markup
pair: entry; pair
double: entry; double
triple: index; entry; triple
- keyword: with
+ pair: keyword; with
see: from; to
seealso: fromalso; toalso
@@ -386,7 +386,7 @@ Invalid index markup...
.. index::
single:
pair:
- keyword:
+ pair: keyword;
.. index::
!Main, !Other
--
2.52.0
+5 -3
View File
@@ -1,4 +1,4 @@
%bcond_without optional_tests
%bcond optional_tests 0
Name: python-sphinxcontrib-websupport
Version: 1.2.7
@@ -8,6 +8,8 @@ Summary: Sphinx API for Web Apps
License: BSD-2-Clause
URL: https://github.com/sphinx-doc/sphinxcontrib-websupport
Source: %{pypi_source sphinxcontrib_websupport}
# Compatibility with Sphinx 9+
Patch: https://github.com/sphinx-doc/sphinxcontrib-websupport/pull/91.patch
BuildArch: noarch
%description
@@ -30,10 +32,10 @@ documentation into your Web application.
%pyproject_extras_subpkg -n python3-sphinxcontrib-websupport whoosh
%prep
%autosetup -n sphinxcontrib_websupport-%{version}
%autosetup -n sphinxcontrib_websupport-%{version} -p1
%generate_buildrequires
%pyproject_buildrequires -t
%pyproject_buildrequires
%build
%pyproject_wheel