summaryrefslogtreecommitdiffstats
path: root/Doc/tools/sphinxext/pyspecific.py
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/tools/sphinxext/pyspecific.py')
-rw-r--r--Doc/tools/sphinxext/pyspecific.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/tools/sphinxext/pyspecific.py b/Doc/tools/sphinxext/pyspecific.py
index 9ff9a7a..185fffb 100644
--- a/Doc/tools/sphinxext/pyspecific.py
+++ b/Doc/tools/sphinxext/pyspecific.py
@@ -46,7 +46,11 @@ from pprint import pformat
from docutils.io import StringOutput
from docutils.utils import new_document
from sphinx.builder import Builder
-from sphinx.writers.text import TextWriter
+
+try:
+ from sphinx.writers.text import TextWriter
+except ImportError:
+ from sphinx.textwriter import TextWriter
class PydocTopicsBuilder(Builder):
name = 'pydoc-topics'