# ---------------------
extensions = ['sphinx.ext.refcounting', 'sphinx.ext.coverage',
- 'sphinx.ext.doctest']
+ 'sphinx.ext.doctest', 'pyspecific']
templates_path = ['tools/sphinxext']
# General substitutions.
--- /dev/null
+# -*- 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)
>>> 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::
# file object. If this happens, the simplest workaround is to
# not initialize the base classes.
if fp is not None:
- self.__super_init(fp, hdrs, url)
+ self.__super_init(fp, hdrs, url, code)
def __str__(self):
return 'HTTP Error %s: %s' % (self.code, self.msg)
lib.glob("*.gif")
lib.add_file("idle.icns")
if dir=="command" and parent.physical=="distutils":
- lib.add_file("wininst-6.0.exe")
- lib.add_file("wininst-7.1.exe")
- lib.add_file("wininst-8.0.exe")
- lib.add_file("wininst-9.0.exe")
+ lib.glob("wininst*.exe")
if dir=="setuptools":
lib.add_file("cli.exe")
lib.add_file("gui.exe")