public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Karolina Surma <ksurma@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-sphinx] rawhide: Fix FTBFS with Python 3.15 (rhbz#2488372)
Date: Mon, 29 Jun 2026 11:11:21 GMT [thread overview]
Message-ID: <178273148125.1.1085947254232949154.rpms-python-sphinx-ae5756e76165@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-sphinx
Branch : rawhide
Commit : ae5756e76165a713b71ba0cbd5f3496d5e43d92a
Author : Karolina Surma <ksurma@redhat.com>
Date : 2026-06-29T11:19:25+02:00
Stats : +169/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-sphinx/c/ae5756e76165a713b71ba0cbd5f3496d5e43d92a?branch=rawhide
Log:
Fix FTBFS with Python 3.15 (rhbz#2488372)
---
diff --git a/14474.patch b/14474.patch
new file mode 100644
index 0000000..b4417aa
--- /dev/null
+++ b/14474.patch
@@ -0,0 +1,166 @@
+From d1fd6eb79e7949aa802d8849aa9ce311be79f2d2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?=
+ <10796600+picnixz@users.noreply.github.com>
+Date: Sun, 7 Jun 2026 11:27:41 +0200
+Subject: [PATCH 1/6] Fix `test_search.py` with long-word splitting
+
+---
+ tests/test_search.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test_search.py b/tests/test_search.py
+index f94ae987bb7..b6b72bcfff7 100644
+--- a/tests/test_search.py
++++ b/tests/test_search.py
+@@ -144,7 +144,7 @@ def test_stemmer(app: SphinxTestApp) -> None:
+ searchindex = load_searchindex(app.outdir / 'searchindex.js')
+ print(searchindex)
+ assert is_registered_term(searchindex, 'findthisstemmedkey')
+- assert is_registered_term(searchindex, 'intern')
++ assert is_registered_term(searchindex, 'internat')
+
+
+ @pytest.mark.sphinx('html', testroot='search')
+
+From 469773d068aadc85c6a1dda17b9db0334cca8db2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?=
+ <10796600+picnixz@users.noreply.github.com>
+Date: Sun, 7 Jun 2026 11:30:08 +0200
+Subject: [PATCH 2/6] probably more fixes
+
+---
+ tests/roots/test-search/index.rst | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/roots/test-search/index.rst b/tests/roots/test-search/index.rst
+index b38fd0271f6..c618633c345 100644
+--- a/tests/roots/test-search/index.rst
++++ b/tests/roots/test-search/index.rst
+@@ -19,6 +19,7 @@ International
+
+ .. tip::
+ :class: no-search
++
+ bat cat
+
+ .. toctree::
+
+From 6f824176535f4b873cbdfe7c9e99d5f23262a857 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?=
+ <10796600+picnixz@users.noreply.github.com>
+Date: Sun, 7 Jun 2026 11:39:03 +0200
+Subject: [PATCH 3/6] better fix
+
+---
+ tests/test_search.py | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test_search.py b/tests/test_search.py
+index b6b72bcfff7..b55788091b2 100644
+--- a/tests/test_search.py
++++ b/tests/test_search.py
+@@ -76,6 +76,14 @@ def is_registered_term(index: Any, keyword: str) -> bool:
+ return index['terms'].get(keyword, []) != []
+
+
++def is_registered_prefix(index: Any, prefix: str) -> bool:
++ terms = index["terms"]
++ for key, value in terms.items():
++ if key.startswith(prefix) and value != []:
++ return True
++ return False
++
++
+ FILE_CONTENTS = """\
+ section_title
+ =============
+@@ -144,7 +152,7 @@ def test_stemmer(app: SphinxTestApp) -> None:
+ searchindex = load_searchindex(app.outdir / 'searchindex.js')
+ print(searchindex)
+ assert is_registered_term(searchindex, 'findthisstemmedkey')
+- assert is_registered_term(searchindex, 'internat')
++ assert is_registered_prefix(searchindex, 'intern')
+
+
+ @pytest.mark.sphinx('html', testroot='search')
+
+From c638919f7ea87104c25a77508e15163cfb466b30 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?=
+ <10796600+picnixz@users.noreply.github.com>
+Date: Sun, 7 Jun 2026 11:40:31 +0200
+Subject: [PATCH 4/6] fixup
+
+---
+ tests/test_search.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test_search.py b/tests/test_search.py
+index b55788091b2..57cf310f036 100644
+--- a/tests/test_search.py
++++ b/tests/test_search.py
+@@ -77,7 +77,7 @@ def is_registered_term(index: Any, keyword: str) -> bool:
+
+
+ def is_registered_prefix(index: Any, prefix: str) -> bool:
+- terms = index["terms"]
++ terms = index['terms']
+ for key, value in terms.items():
+ if key.startswith(prefix) and value != []:
+ return True
+
+From 55f34f425547c521eaa982c1f01ee87e7fbdc4e7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?=
+ <10796600+picnixz@users.noreply.github.com>
+Date: Sun, 7 Jun 2026 11:41:09 +0200
+Subject: [PATCH 5/6] fixup
+
+---
+ tests/test_search.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tests/test_search.py b/tests/test_search.py
+index 57cf310f036..3643794f8b8 100644
+--- a/tests/test_search.py
++++ b/tests/test_search.py
+@@ -78,10 +78,10 @@ def is_registered_term(index: Any, keyword: str) -> bool:
+
+ def is_registered_prefix(index: Any, prefix: str) -> bool:
+ terms = index['terms']
+- for key, value in terms.items():
+- if key.startswith(prefix) and value != []:
+- return True
+- return False
++ return any(
++ key.startswith(prefix) and value != []
++ for key, value in terms.items()
++ )
+
+
+ FILE_CONTENTS = """\
+
+From 6510fb585219bc218a32f7d520fa40a540828aad Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?=
+ <10796600+picnixz@users.noreply.github.com>
+Date: Sun, 7 Jun 2026 11:41:34 +0200
+Subject: [PATCH 6/6] ruff
+
+---
+ tests/test_search.py | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/tests/test_search.py b/tests/test_search.py
+index 3643794f8b8..64ec4670085 100644
+--- a/tests/test_search.py
++++ b/tests/test_search.py
+@@ -78,10 +78,7 @@ def is_registered_term(index: Any, keyword: str) -> bool:
+
+ def is_registered_prefix(index: Any, prefix: str) -> bool:
+ terms = index['terms']
+- return any(
+- key.startswith(prefix) and value != []
+- for key, value in terms.items()
+- )
++ return any(k.startswith(prefix) and v != [] for k, v in terms.items())
+
+
+ FILE_CONTENTS = """\
diff --git a/python-sphinx.spec b/python-sphinx.spec
index 493d203..518787d 100644
--- a/python-sphinx.spec
+++ b/python-sphinx.spec
@@ -41,6 +41,9 @@ Source: %{pypi_source sphinx %{upstream_version}}
# which causes that test to fail.
Patch: sphinx-test_theming.patch
+# Fix for test_stemmer failing with Python 3.15+, merged upstream
+Patch: https://github.com/sphinx-doc/sphinx/pull/14474.patch
+
# Make the first party extensions optional
# This removes the runtime dependencies on:
# - sphinxcontrib.applehelp
reply other threads:[~2026-06-29 11:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178273148125.1.1085947254232949154.rpms-python-sphinx-ae5756e76165@fedoraproject.org \
--to=ksurma@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox