mirror of
https://github.com/python/cpython.git
synced 2024-12-01 11:15:56 +01:00
fa0d703433
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72506 | vinay.sajip | 2009-05-09 07:07:17 -0500 (Sat, 09 May 2009) | 1 line Issue #5971: StreamHandler.handleError now swallows IOErrors which occur when trying to print a traceback. ........ r72525 | benjamin.peterson | 2009-05-09 20:38:02 -0500 (Sat, 09 May 2009) | 1 line close file explicitly ........ r72526 | benjamin.peterson | 2009-05-09 21:29:00 -0500 (Sat, 09 May 2009) | 1 line make sure files are closed using the with statement ........ r72551 | benjamin.peterson | 2009-05-10 09:16:47 -0500 (Sun, 10 May 2009) | 1 line use isinstance ........ r72558 | benjamin.peterson | 2009-05-10 18:52:09 -0500 (Sun, 10 May 2009) | 1 line sys.setdefaultencoding() strikes me as a bad example ........ r72616 | benjamin.peterson | 2009-05-13 19:33:10 -0500 (Wed, 13 May 2009) | 1 line importlib.import_module is better these days ........ r72654 | benjamin.peterson | 2009-05-14 17:37:49 -0500 (Thu, 14 May 2009) | 1 line prevent refleaks from threads ........ r72655 | benjamin.peterson | 2009-05-14 17:40:34 -0500 (Thu, 14 May 2009) | 1 line a useful decorator for cleaning up threads ........ r72689 | benjamin.peterson | 2009-05-16 13:44:34 -0500 (Sat, 16 May 2009) | 1 line use skipTest() ........ r72745 | benjamin.peterson | 2009-05-17 09:16:29 -0500 (Sun, 17 May 2009) | 1 line ignore .rst files in sphinx its self ........ r72750 | benjamin.peterson | 2009-05-17 11:59:27 -0500 (Sun, 17 May 2009) | 1 line chop off slash ........ r72802 | georg.brandl | 2009-05-20 13:35:27 -0500 (Wed, 20 May 2009) | 1 line #6051: refer to email examples for better way to construct email messages. ........ r72812 | michael.foord | 2009-05-21 17:57:02 -0500 (Thu, 21 May 2009) | 1 line Rename TestCase._result to _resultForDoCleanups to avoid potential clashes in TestCase subclasses. Issue 6072. ........ r72822 | georg.brandl | 2009-05-22 04:33:25 -0500 (Fri, 22 May 2009) | 1 line #6084: fix example. ........ r72824 | georg.brandl | 2009-05-22 04:43:17 -0500 (Fri, 22 May 2009) | 1 line Fix references to file-related functions and methods (os.* vs file.*). ........ r72826 | georg.brandl | 2009-05-22 04:49:42 -0500 (Fri, 22 May 2009) | 1 line Fix confusing wording. ........ r72827 | georg.brandl | 2009-05-22 04:50:30 -0500 (Fri, 22 May 2009) | 1 line s/use/call/ ........ r72833 | georg.brandl | 2009-05-22 12:00:17 -0500 (Fri, 22 May 2009) | 1 line #6078: _warnings is a builtin module and has no standard init_warnings function. ........ r72876 | benjamin.peterson | 2009-05-23 15:59:09 -0500 (Sat, 23 May 2009) | 1 line remove mention of old ctypes version ........ r72890 | gregory.p.smith | 2009-05-24 13:00:13 -0500 (Sun, 24 May 2009) | 2 lines add a versionadded tag for set_tunnel ........ r72923 | michael.foord | 2009-05-25 15:36:56 -0500 (Mon, 25 May 2009) | 1 line Make assertSequenceEqual error messages less cryptic, particularly for nested sequences. ........ r72946 | ronald.oussoren | 2009-05-26 13:44:48 -0500 (Tue, 26 May 2009) | 2 lines Fixes issue 6110 ........ r73026 | r.david.murray | 2009-05-29 14:30:27 -0500 (Fri, 29 May 2009) | 3 lines Issue 6141: document that the first item of args is still the command name even when executable is specified. ........ r73042 | benjamin.peterson | 2009-05-29 22:10:52 -0500 (Fri, 29 May 2009) | 1 line no fdatasync on macos ........ r73045 | georg.brandl | 2009-05-30 02:26:04 -0500 (Sat, 30 May 2009) | 1 line #6146: fix markup bug. ........ r73047 | georg.brandl | 2009-05-30 05:33:23 -0500 (Sat, 30 May 2009) | 1 line Fix some more small markup problems. ........ r73065 | antoine.pitrou | 2009-05-30 16:39:25 -0500 (Sat, 30 May 2009) | 3 lines The test for #5330 wasn't correct. ........ r73068 | antoine.pitrou | 2009-05-30 16:45:40 -0500 (Sat, 30 May 2009) | 3 lines Update ACKS ........ r73069 | benjamin.peterson | 2009-05-30 19:42:42 -0500 (Sat, 30 May 2009) | 1 line fix signature ........
189 lines
5.6 KiB
Python
189 lines
5.6 KiB
Python
# -*- coding: utf-8 -*-
|
|
#
|
|
# Python documentation build configuration file
|
|
#
|
|
# This file is execfile()d with the current directory set to its containing dir.
|
|
#
|
|
# The contents of this file are pickled, so don't put values in the namespace
|
|
# that aren't pickleable (module imports are okay, they're removed automatically).
|
|
|
|
import sys, os, time
|
|
sys.path.append(os.path.abspath('tools/sphinxext'))
|
|
|
|
# General configuration
|
|
# ---------------------
|
|
|
|
extensions = ['sphinx.ext.refcounting', 'sphinx.ext.coverage',
|
|
'sphinx.ext.doctest', 'pyspecific']
|
|
templates_path = ['tools/sphinxext']
|
|
|
|
# General substitutions.
|
|
project = 'Python'
|
|
copyright = '1990-%s, Python Software Foundation' % time.strftime('%Y')
|
|
|
|
# The default replacements for |version| and |release|.
|
|
#
|
|
# The short X.Y version.
|
|
# version = '2.6'
|
|
# The full version, including alpha/beta/rc tags.
|
|
# release = '2.6a0'
|
|
|
|
# We look for the Include/patchlevel.h file in the current Python source tree
|
|
# and replace the values accordingly.
|
|
import patchlevel
|
|
version, release = patchlevel.get_version_info()
|
|
|
|
# There are two options for replacing |today|: either, you set today to some
|
|
# non-false value, then it is used:
|
|
today = ''
|
|
# Else, today_fmt is used as the format for a strftime call.
|
|
today_fmt = '%B %d, %Y'
|
|
|
|
# List of files that shouldn't be included in the build.
|
|
unused_docs = [
|
|
'maclib/scrap',
|
|
'library/xmllib',
|
|
'library/xml.etree',
|
|
]
|
|
|
|
# Ignore .rst in Sphinx its self.
|
|
exclude_trees = ['tools/sphinx']
|
|
|
|
# Relative filename of the reference count data file.
|
|
refcount_file = 'data/refcounts.dat'
|
|
|
|
# If true, '()' will be appended to :func: etc. cross-reference text.
|
|
add_function_parentheses = True
|
|
|
|
# If true, the current module name will be prepended to all description
|
|
# unit titles (such as .. function::).
|
|
add_module_names = True
|
|
|
|
# By default, highlight as Python 3.
|
|
highlight_language = 'python3'
|
|
|
|
|
|
# Options for HTML output
|
|
# -----------------------
|
|
|
|
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
|
# using the given strftime format.
|
|
html_last_updated_fmt = '%b %d, %Y'
|
|
|
|
# If true, SmartyPants will be used to convert quotes and dashes to
|
|
# typographically correct entities.
|
|
html_use_smartypants = True
|
|
|
|
# Custom sidebar templates, filenames relative to this file.
|
|
html_sidebars = {
|
|
'index': 'indexsidebar.html',
|
|
}
|
|
|
|
# Additional templates that should be rendered to pages.
|
|
html_additional_pages = {
|
|
'download': 'download.html',
|
|
'index': 'indexcontent.html',
|
|
}
|
|
|
|
# Output an OpenSearch description file.
|
|
html_use_opensearch = 'http://docs.python.org/dev/3.0'
|
|
|
|
# Additional static files.
|
|
html_static_path = ['tools/sphinxext/static']
|
|
|
|
# Output file base name for HTML help builder.
|
|
htmlhelp_basename = 'python' + release.replace('.', '')
|
|
|
|
# Split the index
|
|
html_split_index = True
|
|
|
|
|
|
# Options for LaTeX output
|
|
# ------------------------
|
|
|
|
# The paper size ('letter' or 'a4').
|
|
latex_paper_size = 'a4'
|
|
|
|
# The font size ('10pt', '11pt' or '12pt').
|
|
latex_font_size = '10pt'
|
|
|
|
# Grouping the document tree into LaTeX files. List of tuples
|
|
# (source start file, target name, title, author, document class [howto/manual]).
|
|
_stdauthor = r'Guido van Rossum\\Fred L. Drake, Jr., editor'
|
|
latex_documents = [
|
|
('c-api/index', 'c-api.tex',
|
|
'The Python/C API', _stdauthor, 'manual'),
|
|
('distutils/index', 'distutils.tex',
|
|
'Distributing Python Modules', _stdauthor, 'manual'),
|
|
('documenting/index', 'documenting.tex',
|
|
'Documenting Python', 'Georg Brandl', 'manual'),
|
|
('extending/index', 'extending.tex',
|
|
'Extending and Embedding Python', _stdauthor, 'manual'),
|
|
('install/index', 'install.tex',
|
|
'Installing Python Modules', _stdauthor, 'manual'),
|
|
('library/index', 'library.tex',
|
|
'The Python Library Reference', _stdauthor, 'manual'),
|
|
('reference/index', 'reference.tex',
|
|
'The Python Language Reference', _stdauthor, 'manual'),
|
|
('tutorial/index', 'tutorial.tex',
|
|
'Python Tutorial', _stdauthor, 'manual'),
|
|
('using/index', 'using.tex',
|
|
'Using Python', _stdauthor, 'manual'),
|
|
('whatsnew/' + version, 'whatsnew.tex',
|
|
'What\'s New in Python', 'A. M. Kuchling', 'howto'),
|
|
]
|
|
# Collect all HOWTOs individually
|
|
latex_documents.extend(('howto/' + fn[:-4], 'howto-' + fn[:-4] + '.tex',
|
|
'', _stdauthor, 'howto')
|
|
for fn in os.listdir('howto')
|
|
if fn.endswith('.rst') and fn != 'index.rst')
|
|
|
|
# Additional stuff for the LaTeX preamble.
|
|
latex_preamble = r'''
|
|
\authoraddress{
|
|
\strong{Python Software Foundation}\\
|
|
Email: \email{docs@python.org}
|
|
}
|
|
\let\Verbatim=\OriginalVerbatim
|
|
\let\endVerbatim=\endOriginalVerbatim
|
|
'''
|
|
|
|
# Documents to append as an appendix to all manuals.
|
|
latex_appendices = ['glossary', 'about', 'license', 'copyright']
|
|
|
|
# Options for the coverage checker
|
|
# --------------------------------
|
|
|
|
# The coverage checker will ignore all modules/functions/classes whose names
|
|
# match any of the following regexes (using re.match).
|
|
coverage_ignore_modules = [
|
|
r'[T|t][k|K]',
|
|
r'Tix',
|
|
r'distutils.*',
|
|
]
|
|
|
|
coverage_ignore_functions = [
|
|
'test($|_)',
|
|
]
|
|
|
|
coverage_ignore_classes = [
|
|
]
|
|
|
|
# Glob patterns for C source files for C API coverage, relative to this directory.
|
|
coverage_c_path = [
|
|
'../Include/*.h',
|
|
]
|
|
|
|
# Regexes to find C items in the source files.
|
|
coverage_c_regexes = {
|
|
'cfunction': (r'^PyAPI_FUNC\(.*\)\s+([^_][\w_]+)'),
|
|
'data': (r'^PyAPI_DATA\(.*\)\s+([^_][\w_]+)'),
|
|
'macro': (r'^#define ([^_][\w_]+)\(.*\)[\s|\\]'),
|
|
}
|
|
|
|
# The coverage checker will ignore all C items whose names match these regexes
|
|
# (using re.match) -- the keys must be the same as in coverage_c_regexes.
|
|
coverage_ignore_c_items = {
|
|
# 'cfunction': [...]
|
|
}
|