[Python-checkins] devguide: Start using sphinx.ext.intersphinx to link to module docs.

brett.cannon python-checkins at python.org
Thu Jan 6 21:44:14 CET 2011


brett.cannon pushed a9a81a97442a to devguide:

http://hg.python.org/devguide/rev/a9a81a97442a
changeset:   32:a9a81a97442a
user:        Brett Cannon <brett at python.org>
date:        Wed Jan 05 14:41:04 2011 -0800
summary:
  Start using sphinx.ext.intersphinx to link to module docs.

files:
  conf.py
  runtests.rst

diff --git a/conf.py b/conf.py
--- a/conf.py
+++ b/conf.py
@@ -25,7 +25,8 @@
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.todo']
+extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.todo']
+intersphinx_mapping = {'python': ('http://docs.python.org/py3k', None)}
 todo_include_todos = True
 
 # Add any paths that contain templates here, relative to this directory.
diff --git a/runtests.rst b/runtests.rst
--- a/runtests.rst
+++ b/runtests.rst
@@ -16,8 +16,8 @@
     ./python -m test
 
 That will run the entire standard test suite (i.e., all tests that do not
-consume a lot of resources) using the ``test.regrtest`` module (Python's test
-runner which you can execute directly if you prefer).
+consume a lot of resources) using the :py:mod:`test.regrtest` module (Python's
+test runner which you can execute directly if you prefer).
 To run **all** tests, you need to specify what
 resources you are willing to have consumed. For those flags (and others which
 can help debug various issues such as reference leaks), read the help text::
@@ -51,11 +51,11 @@
 possible. Tests live in the ``Lib/test`` directory, where every file that
 includes tests has a ``test_`` prefix.
 
-One difference, though, is that you are allowed to use the ``test.support``
-module. It contains various helpers that are tailored to Python's test suite.
-Because of this it has no API or backwards-compatibility guarantees, which is
-why the general public is not supposed to use the module. But when you are
-writing tests for Python's test suite its use is encouraged.
+One difference, though, is that you are allowed to use the
+:py:mod:`test.support` module. It contains various helpers that are tailored to
+Python's test suite. Because of this it has no API or backwards-compatibility
+guarantees, which is why the general public is not supposed to use the module.
+But when you are writing tests for Python's test suite its use is encouraged.
 
 If your test must write various temporary files to a specific directory, you
 can use the ``Lib/test/data`` directory for that purpose.

--
Repository URL: http://hg.python.org/devguide


More information about the Python-checkins mailing list