summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-04-10 03:06:53 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2008-04-10 03:06:53 (GMT)
commit5680d0c5e3a9d42b6c21f4a31a7dbfe72c9e5170 (patch)
tree136c5f661370582c3c9aaa8baac59228dfd9de28 /Doc
parent3de92bf155a1fff6e48b32c5d5f0071f6669ebf0 (diff)
downloadcpython-5680d0c5e3a9d42b6c21f4a31a7dbfe72c9e5170.zip
cpython-5680d0c5e3a9d42b6c21f4a31a7dbfe72c9e5170.tar.gz
cpython-5680d0c5e3a9d42b6c21f4a31a7dbfe72c9e5170.tar.bz2
Merged revisions 62246-62259 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r62246 | georg.brandl | 2008-04-09 19:57:38 +0200 (Mi, 09 Apr 2008) | 2 lines #2585: initialize code attribute of HTTPError. ........ r62247 | georg.brandl | 2008-04-09 19:58:56 +0200 (Mi, 09 Apr 2008) | 2 lines Add :issue: directive for easy linking to bugs.python.org. ........ r62249 | gregory.p.smith | 2008-04-09 20:18:43 +0200 (Mi, 09 Apr 2008) | 2 lines Add a note about the zlib.decompressobj().flush() fix. ........ r62255 | martin.v.loewis | 2008-04-09 20:56:20 +0200 (Mi, 09 Apr 2008) | 2 lines Package wininst*.exe from distutils/command. ........ r62259 | andrew.kuchling | 2008-04-10 00:28:43 +0200 (Do, 10 Apr 2008) | 1 line Try out the new issue role. Thanks, Georg! ........
Diffstat (limited to 'Doc')
-rw-r--r--Doc/conf.py2
-rw-r--r--Doc/tools/sphinxext/pyspecific.py24
-rw-r--r--Doc/whatsnew/2.6.rst2
3 files changed, 26 insertions, 2 deletions
diff --git a/Doc/conf.py b/Doc/conf.py
index b7fdf45..ec889d7 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -14,7 +14,7 @@ sys.path.append('tools/sphinxext')
# ---------------------
extensions = ['sphinx.ext.refcounting', 'sphinx.ext.coverage',
- 'sphinx.ext.doctest']
+ 'sphinx.ext.doctest', 'pyspecific']
templates_path = ['tools/sphinxext']
# General substitutions.
diff --git a/Doc/tools/sphinxext/pyspecific.py b/Doc/tools/sphinxext/pyspecific.py
new file mode 100644
index 0000000..f7c0daa
--- /dev/null
+++ b/Doc/tools/sphinxext/pyspecific.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+"""
+ pyspecific.py
+ ~~~~~~~~~~~~~
+
+ Sphinx extension with Python doc-specific markup.
+
+ :copyright: 2008 by Georg Brandl.
+ :license: Python license.
+"""
+
+ISSUE_URI = 'http://bugs.python.org/issue%s'
+
+from docutils import nodes, utils
+
+def issue_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
+ issue = utils.unescape(text)
+ text = 'issue ' + issue
+ refnode = nodes.reference(text, text, refuri=ISSUE_URI % issue)
+ return [refnode], []
+
+
+def setup(app):
+ app.add_role('issue', issue_role)
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index 29a2693..8cbe49f 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -1217,7 +1217,7 @@ Here are all of the changes that Python 2.6 makes to the core Python language.
>>> f(**ud)
['a', 'b']
- .. Patch 1686487
+ (Contributed by Alexander Belopolsky; :issue:`1686487`.)
* Tuples now have an :meth:`index` method matching the list type's
:meth:`index` method::