forked from pool/python39
- Add patch sphinx-update-removed-function.patch to no longer call
a now removed function and to make documentation build independent of the Sphinx version (gh#python/cpython#13236). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python39?expand=0&rev=36
This commit is contained in:
29
sphinx-update-removed-function.patch
Normal file
29
sphinx-update-removed-function.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
From 960bb883769e5c64a63b014590d75654db87ffb0 Mon Sep 17 00:00:00 2001
|
||||
From: Pablo Galindo <Pablogsal@gmail.com>
|
||||
Date: Fri, 10 May 2019 22:58:17 +0100
|
||||
Subject: [PATCH] Fix sphinx deprecation warning about env.note_versionchange()
|
||||
(GH-13236)
|
||||
|
||||
---
|
||||
Doc/tools/extensions/pyspecific.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/Doc/tools/extensions/pyspecific.py
|
||||
+++ b/Doc/tools/extensions/pyspecific.py
|
||||
@@ -231,10 +231,14 @@ class DeprecatedRemoved(Directive):
|
||||
translatable=False)
|
||||
node.append(para)
|
||||
env = self.state.document.settings.env
|
||||
- env.note_versionchange('deprecated', version[0], node, self.lineno)
|
||||
+ # new method
|
||||
+ if hasattr(env, 'get_domain'):
|
||||
+ env.get_domain('changeset').note_changeset(node)
|
||||
+ # deprecated pre-Sphinx-2 method
|
||||
+ else:
|
||||
+ env.note_versionchange('deprecated', version[0], node, self.lineno)
|
||||
return [node] + messages
|
||||
|
||||
-
|
||||
# Support for including Misc/NEWS
|
||||
|
||||
issue_re = re.compile('(?:[Ii]ssue #|bpo-)([0-9]+)')
|
||||
Reference in New Issue
Block a user