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:
Kirill Podoprigora 2024-04-26 13:10:16 +03:00 committed by GitHub
parent ef940dec40
commit 463c20dae9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 24 additions and 40 deletions

View file

@ -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

View file

@ -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'