[PATCH] sphinx: Use modern syntax for extlinks
authorMatthew Pickering <matthewtpickering@gmail.com>
Tue, 3 Jan 2023 15:56:37 +0000 (15:56 +0000)
committerScott Talbert <swt@techie.net>
Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)
This fixes the following build error:

```
  Command line: /opt/homebrew/opt/sphinx-doc/bin/sphinx-build -b man -d /private/tmp/extra-dir-55768274273/.doctrees-man -n -w /private/tmp/extra-dir-55768274273/.log docs/users_guide /private/tmp/extra-dir-55768274273
  ===> Command failed with error code: 2

  Exception occurred:
    File "/opt/homebrew/Cellar/sphinx-doc/6.0.0/libexec/lib/python3.11/site-packages/sphinx/ext/extlinks.py", line 101, in role
      title = caption % part
              ~~~~~~~~^~~~~~
  TypeError: not all arguments converted during string formatting
```

I tested on Sphinx-5.1.1 and Sphinx-6.0.0

Thanks for sterni for providing instructions about how to test using
sphinx-6.0.0.

Fixes #22690

Gbp-Pq: Name 00dc51060881df81258ba3b3bdf447294618a4de.patch

docs/users_guide/ghc_config.py.in

index e2f5c71d5d33a23461795d2bd117bd141f62a529..5b342244c3688dd0625314d4be5d9641e6a21030 100644 (file)
@@ -1,6 +1,6 @@
 extlinks = {
-    'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', '#'),
-    'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', '#'),
+    'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', '%s'),
+    'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', '#%s'),
 }
 
 libs_base_uri = '../libraries'