summaryrefslogtreecommitdiff
path: root/doc/ext/appapi.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-10-12 20:48:03 +0200
committerGeorg Brandl <georg@python.org>2013-10-12 20:48:03 +0200
commitd4871c27925babd1b3d1665decc812fe7c6734d8 (patch)
tree9042e9825f6995fc222ca59c0efd2f90fe282e69 /doc/ext/appapi.rst
parente405e75e6f8e882ab094a8f0c2afc678ee16c0a4 (diff)
downloadsphinx-d4871c27925babd1b3d1665decc812fe7c6734d8.tar.gz
Add sphinx.version_info for better programmatic check of the Sphinx version.
Diffstat (limited to 'doc/ext/appapi.rst')
-rw-r--r--doc/ext/appapi.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/ext/appapi.rst b/doc/ext/appapi.rst
index 1f5c063c..c194a841 100644
--- a/doc/ext/appapi.rst
+++ b/doc/ext/appapi.rst
@@ -462,6 +462,22 @@ registered event handlers.
.. versionadded:: 0.5
+Checking the Sphinx version
+---------------------------
+
+.. currentmodule:: sphinx
+
+Use this to adapt your extension to API changes in Sphinx.
+
+.. data:: version_info
+
+ A tuple of five elements; for Sphinx version 1.2.1 beta 3 this would be
+ ``(1, 2, 1, 'beta', 3)``.
+
+ .. versionadded:: 1.2
+ Before version 1.2, check the string ``sphinx.__version__``.
+
+
.. _template-bridge:
The template bridge