mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
gh-117928: Bump the minimum Sphinx version to 6.2.1 (#117853)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
parent
ef940dec40
commit
463c20dae9
6 changed files with 24 additions and 40 deletions
|
@ -19,7 +19,6 @@
|
|||
"""
|
||||
|
||||
from os import path
|
||||
import docutils
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst import directives
|
||||
from docutils.parsers.rst import Directive
|
||||
|
@ -40,16 +39,6 @@ REST_ROLE_MAP = {
|
|||
}
|
||||
|
||||
|
||||
# Monkeypatch nodes.Node.findall for forwards compatibility
|
||||
# This patch can be dropped when the minimum Sphinx version is 4.4.0
|
||||
# or the minimum Docutils version is 0.18.1.
|
||||
if docutils.__version_info__ < (0, 18, 1):
|
||||
def findall(self, *args, **kwargs):
|
||||
return iter(self.traverse(*args, **kwargs))
|
||||
|
||||
nodes.Node.findall = findall
|
||||
|
||||
|
||||
class RCEntry:
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
|
|
|
@ -27,13 +27,7 @@ from sphinx.locale import _ as sphinx_gettext
|
|||
from sphinx.util import logging
|
||||
from sphinx.util.docutils import SphinxDirective
|
||||
from sphinx.writers.text import TextWriter, TextTranslator
|
||||
|
||||
try:
|
||||
# Sphinx 6+
|
||||
from sphinx.util.display import status_iterator
|
||||
except ImportError:
|
||||
# Deprecated in Sphinx 6.1, will be removed in Sphinx 8
|
||||
from sphinx.util import status_iterator
|
||||
from sphinx.util.display import status_iterator
|
||||
|
||||
|
||||
ISSUE_URI = 'https://bugs.python.org/issue?@action=redirect&bpo=%s'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue