From 4944f6ff75e0a5e28d9719ae30dba03f196f2acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 21 Mar 2023 16:42:09 +0100 Subject: [PATCH] Make sphinx.ext.extlinks captions actual string templates In Sphinx 3, this used to be a prefix, but it is the full caption since Sphinx 4: https://github.com/sphinx-doc/sphinx/commit/fb39974486ab09320f0cf45f3c0ba0175f04d7d6 With Sphinx 6, captions without %s fail: https://github.com/sphinx-doc/sphinx/commit/ce31e1c0c7b32f6be93186e0fef076ef65ff0b05 Exception occurred: File "/usr/lib/python3.11/site-packages/sphinx/ext/extlinks.py", line 103, in role title = caption % part ~~~~~~~~^~~~~~ TypeError: not all arguments converted during string formatting Fixes Fedora downstream report: https://bugzilla.redhat.com/2180479 --- docs/html/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/html/conf.py b/docs/html/conf.py index cc967e0ba3c..aae1364b87a 100644 --- a/docs/html/conf.py +++ b/docs/html/conf.py @@ -74,9 +74,9 @@ # -- Options for extlinks ------------------------------------------------------------- extlinks = { - "issue": ("https://github.com/pypa/pip/issues/%s", "#"), - "pull": ("https://github.com/pypa/pip/pull/%s", "PR #"), - "pypi": ("https://pypi.org/project/%s/", ""), + "issue": ("https://github.com/pypa/pip/issues/%s", "#%s"), + "pull": ("https://github.com/pypa/pip/pull/%s", "PR #%s"), + "pypi": ("https://pypi.org/project/%s/", "%s"), } # -- Options for towncrier_draft extension --------------------------------------------