summaryrefslogtreecommitdiffstats
path: root/Doc/tools/extensions/pyspecific.py
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/tools/extensions/pyspecific.py')
-rw-r--r--Doc/tools/extensions/pyspecific.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py
index 446cffc..9104be0 100644
--- a/Doc/tools/extensions/pyspecific.py
+++ b/Doc/tools/extensions/pyspecific.py
@@ -14,30 +14,28 @@ import io
from os import getenv, path
from time import asctime
from pprint import pformat
+
+from docutils import nodes, utils
from docutils.io import StringOutput
from docutils.parsers.rst import Directive
from docutils.utils import new_document
-
-from docutils import nodes, utils
-
from sphinx import addnodes
from sphinx.builders import Builder
-try:
- from sphinx.errors import NoUri
-except ImportError:
- from sphinx.environment import NoUri
+from sphinx.domains.python import PyFunction, PyMethod
+from sphinx.errors import NoUri
from sphinx.locale import _ as sphinx_gettext
-from sphinx.util import status_iterator, logging
+from sphinx.util import logging
from sphinx.util.docutils import SphinxDirective
from sphinx.util.nodes import split_explicit_title
from sphinx.writers.text import TextWriter, TextTranslator
from sphinx.writers.latex import LaTeXTranslator
try:
- from sphinx.domains.python import PyFunction, PyMethod
+ # Sphinx 6+
+ from sphinx.util.display import status_iterator
except ImportError:
- from sphinx.domains.python import PyClassmember as PyMethod
- from sphinx.domains.python import PyModulelevel as PyFunction
+ # Deprecated in Sphinx 6.1, will be removed in Sphinx 8
+ from sphinx.util import status_iterator
# Support for checking for suspicious markup