[Git][ghc/ghc][wip/23807] Deleted 1 commit: docs-sphinx: make extlinks compatible with both old and new versions of sphinx
Zubin (@wz1000)
gitlab at gitlab.haskell.org
Thu Aug 10 09:53:56 UTC 2023
Zubin pushed to branch wip/23807 at Glasgow Haskell Compiler / GHC
WARNING: The push did not contain any new commits, but force pushed to delete the commits and changes below.
Deleted commits:
9d4b1c57 by Zubin Duggal at 2023-08-09T18:08:45+05:30
docs-sphinx: make extlinks compatible with both old and new versions of sphinx
New versions of sphinx (>= 4.0) require explicit format strings. But these
are not accepted by older versions.
Solution: decide the format string by looking at the sphinx version
- - - - -
1 changed file:
- docs/users_guide/ghc_config.py.in
Changes:
=====================================
docs/users_guide/ghc_config.py.in
=====================================
@@ -1,6 +1,16 @@
+import sphinx
+from packaging import version
+
+if version.parse(sphinx.__version__) >= version.parse('4.0'):
+ # sphinx 4.0 requires an explicit format string
+ issue_string = '#%s'
+else:
+ # in sphinx <4.0 we specify a prefix
+ issue_string = '#'
+
extlinks = {
- 'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', '%s'),
- 'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', '#%s'),
+ 'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', issue_string),
+ 'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', issue_string),
}
libs_base_uri = '../libraries'
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9d4b1c5778a5b7a6a832f5f637a385128385828b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9d4b1c5778a5b7a6a832f5f637a385128385828b
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230810/80a5404a/attachment.html>
More information about the ghc-commits
mailing list