Content-Length: 278072 | pFad | https://github.com/python/cpython/commit/b63a620014b67a6e63d10783149c41baaf59def8

42 bpo-42579: Make workaround for various versions of Sphinx more robust… · python/cpython@b63a620 · GitHub
Skip to content

Commit b63a620

Browse files
authored
bpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662)
The solution in gh##13236 is too strict because it effectively requires the use of Sphinx >= 2.0. It is not too difficult to make the same solution more robust so it works with all normal versions of Sphinx.
1 parent c0afb7f commit b63a620

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Doc/tools/extensions/pyspecific.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,12 @@ def run(self):
394394
translatable=False)
395395
node.append(para)
396396
env = self.state.document.settings.env
397-
env.get_domain('changeset').note_changeset(node)
397+
# deprecated pre-Sphinx-2 method
398+
if hasattr(env, 'note_versionchange'):
399+
env.note_versionchange('deprecated', version[0], node, self.lineno)
400+
# new method
401+
else:
402+
env.get_domain('changeset').note_changeset(node)
398403
return [node] + messages
399404

400405

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/python/cpython/commit/b63a620014b67a6e63d10783149c41baaf59def8

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy