Closes #22537: Make sphinx extensions compatible with Python 2 or 3, like in the 3.x branches
diff --git a/Doc/conf.py b/Doc/conf.py
index 4051a56..8bf52f7 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -59,6 +59,9 @@
 # unit titles (such as .. function::).
 add_module_names = True
 
+# Require Sphinx 1.2 for build.
+needs_sphinx = '1.2'
+
 
 # Options for HTML output
 # -----------------------