diff --git a/Doc/tools/sphinxext/pyspecific.py b/Doc/tools/sphinxext/pyspecific.py index 185fffb60d3..e4727e3a656 100644 --- a/Doc/tools/sphinxext/pyspecific.py +++ b/Doc/tools/sphinxext/pyspecific.py @@ -45,7 +45,11 @@ def issue_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): from pprint import pformat from docutils.io import StringOutput from docutils.utils import new_document -from sphinx.builder import Builder + +try: + from sphinx.builders import Builder +except ImportError: + from sphinx.builder import Builder try: from sphinx.writers.text import TextWriter