Merge branch 'stable'

This commit is contained in:
Takeshi KOMIYA 2016-07-02 16:39:13 +09:00
commit e3c3e4f0cb
14 changed files with 56 additions and 27 deletions

16
CHANGES
View File

@ -86,6 +86,7 @@ Features added
lets macros (for text styling) be defined only with ``\sphinx``-prefixed names.
* latex writer allows user customization of "shadowed" boxes (topics), via
three length variables.
* woff-format web font files now supported by the epub builder.
Bugs fixed
----------
@ -99,6 +100,18 @@ Bugs fixed
* #2479: `sphinx.ext.viewcode` uses python2 highlighter by default
* #2700: HtmlHelp builder has hard coded index.html
* latex, since 1.4.4 inline literal text is followed by spurious space
* #2722: C++, fix id generation for var/member declarations to include namespaces.
* latex, images (from image directive) in lists or quoted blocks did not obey
indentation (fixed together with #2671)
* #2733: since Sphinx-1.4.4 ``make latexpdf`` generates lots of hyperref warnings
* #2731: `sphinx.ext.autodoc` does not access propertymethods which raises any
exceptions
* #2666: C++, properly look up nested names involving constructors.
* #2579: Could not refer a label including both spaces and colons via
`sphinx.ext.intersphinx`
* #2718: Sphinx crashes if the document file is not readable
* #2699: hyperlinks in help HTMLs are broken if `html_file_suffix` is set
* #2723: extra spaces in latex pdf output from multirow cell
Release 1.4.4 (released Jun 12, 2016)
@ -124,9 +137,6 @@ Bugs fixed
* #2639: Sphinx now bundles iftex.sty
* Failed to build PDF with framed.sty 0.95
* Sphinx now bundles needspace.sty
* #2666: C++, properly look up nested names involving constructors.
* #2579: Could not refer a label including both spaces and colons via
`sphinx.ext.intersphinx`
Release 1.4.3 (released Jun 5, 2016)

View File

@ -33,6 +33,12 @@ Install from cloned source as editable::
pip install -e .
Release signatures
==================
Releases are signed with `498D6B9E <https://pgp.mit.edu/pks/lookup?op=vindex&search=0x102C2C17498D6B9E>`_
Reading the docs
================

View File

@ -135,7 +135,7 @@ install.
.. note::
``pip`` has been contained in the Python official installation after version
of Python-3.4.0 or Python-2.7.9.
of Python-3.4.0 or Python-2.7.9.
Installing Sphinx with pip

View File

@ -243,8 +243,8 @@ class Sphinx(object):
def _init_env(self, freshenv):
if freshenv:
self.env = BuildEnvironment(self.srcdir, self.doctreedir,
self.config)
self.env = BuildEnvironment(self.srcdir, self.doctreedir, self.config)
self.env.set_warnfunc(self.warn)
self.env.find_files(self.config)
for domain in self.domains.keys():
self.env.domains[domain] = self.domains[domain](self.env)
@ -253,6 +253,7 @@ class Sphinx(object):
self.info(bold('loading pickled environment... '), nonl=True)
self.env = BuildEnvironment.frompickle(
self.srcdir, self.config, path.join(self.doctreedir, ENV_PICKLE_FILENAME))
self.env.set_warnfunc(self.warn)
self.env.domains = {}
for domain in self.domains.keys():
# this can raise if the data version doesn't fit
@ -265,8 +266,6 @@ class Sphinx(object):
self.info('failed: %s' % err)
return self._init_env(freshenv=True)
self.env.set_warnfunc(self.warn)
def _init_builder(self, buildername):
if buildername is None:
print('No builder selected, using default: html', file=self._status)

View File

@ -84,6 +84,7 @@ class AppleHelpBuilder(StandaloneHTMLBuilder):
super(AppleHelpBuilder, self).init()
# the output files for HTML help must be .html only
self.out_suffix = '.html'
self.link_suffix = '.html'
if self.config.applehelp_bundle_id is None:
raise SphinxError('You must set applehelp_bundle_id before '

View File

@ -59,6 +59,7 @@ class DevhelpBuilder(StandaloneHTMLBuilder):
def init(self):
StandaloneHTMLBuilder.init(self)
self.out_suffix = '.html'
self.link_suffix = '.html'
def handle_finish(self):
self.build_devhelp(self.outdir, self.config.devhelp_basename)

View File

@ -152,6 +152,7 @@ MEDIA_TYPES = {
'.jpeg': 'image/jpeg',
'.otf': 'application/x-font-otf',
'.ttf': 'application/x-font-ttf',
'.woff': 'application/font-woff',
}
VECTOR_GRAPHICS_EXTENSIONS = ('.svg',)

View File

@ -183,6 +183,7 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder):
StandaloneHTMLBuilder.init(self)
# the output files for HTML help must be .html only
self.out_suffix = '.html'
self.link_suffix = '.html'
# determine the correct locale setting
locale = chm_locales.get(self.config.language)
if locale is not None:

View File

@ -111,6 +111,7 @@ class QtHelpBuilder(StandaloneHTMLBuilder):
StandaloneHTMLBuilder.init(self)
# the output files for HTML help must be .html only
self.out_suffix = '.html'
self.link_suffix = '.html'
# self.config.html_style = 'traditional.css'
def handle_finish(self):

View File

@ -1977,7 +1977,7 @@ class ASTTypeWithInit(ASTBase):
def get_id_v2(self, objectType=None, symbol=None):
if objectType == 'member':
return symbol.declaration.name.get_id_v2()
return symbol.get_full_nested_name().get_id_v2()
else:
return self.type.get_id_v2()

View File

@ -403,8 +403,13 @@ class BuildEnvironment:
config.html_extra_path +
['**/_sources', '.#*', '**/.#*', '*.lproj/**']
)
self.found_docs = set(get_matching_docs(
self.srcdir, config.source_suffix, exclude_matchers=matchers))
self.found_docs = set()
for docname in get_matching_docs(self.srcdir, config.source_suffix,
exclude_matchers=matchers):
if os.access(self.doc2path(docname), os.R_OK):
self.found_docs.add(docname)
else:
self.warn(docname, "document not readable. Ignored.")
# add catalog mo file dependency
for docname in self.found_docs:

View File

@ -97,7 +97,7 @@
\pagenumbering{arabic}%
\ifdefined\fancyhf\pagestyle{normal}\fi
}
%\pagenumbering{alph}%
\pagenumbering{alph}% avoid hyperref "duplicate destination" warnings
% This is needed to get the width of the section # area wide enough in the
% library reference. Doing it here keeps it the same for all the manuals.

View File

@ -108,6 +108,10 @@ def safe_getattr(obj, name, *defargs):
try:
return getattr(obj, name, *defargs)
except Exception:
# sometimes accessing a property raises an exception (e.g.
# NotImplementedError), so let's try to read the attribute directly
if name in obj.__dict__:
return obj.__dict__[name]
# this is a catch-all for all the weird things that some modules do
# with attribute access
if defargs:

View File

@ -1163,28 +1163,28 @@ class LaTeXTranslator(nodes.NodeVisitor):
self.remember_multirow[self.table.col] -= 1
if self.remember_multirowcol.get(self.table.col, 0):
extracols = self.remember_multirowcol[self.table.col]
self.body.append(' \\multicolumn{')
self.body.append('\\multicolumn{')
self.body.append(str(extracols + 1))
self.body.append('}{|l|}{}')
self.body.append('}{|l|}{}\\relax ')
self.table.col += extracols
self.body.append(' & ')
self.body.append('&')
else:
self.body.append(' & ')
self.body.append('&')
self.table.col += 1
context = ''
if 'morecols' in node:
self.body.append(' \\multicolumn{')
self.body.append('\\multicolumn{')
self.body.append(str(node.get('morecols') + 1))
if self.table.col == 1:
self.body.append('}{|l|}{')
self.body.append('}{|l|}{\\relax ')
else:
self.body.append('}{l|}{')
context += '}'
self.body.append('}{l|}{\\relax ')
context += '\\unskip}\\relax '
if 'morerows' in node:
self.body.append(' \\multirow{')
self.body.append('\\multirow{')
self.body.append(str(node.get('morerows') + 1))
self.body.append('}{*}{')
context += '}'
self.body.append('}{*}{\\relax ')
context += '\\unskip}\\relax '
self.remember_multirow[self.table.col] = node.get('morerows')
if 'morecols' in node:
if 'morerows' in node:
@ -1202,16 +1202,16 @@ class LaTeXTranslator(nodes.NodeVisitor):
pass
else:
self.body.append('\\sphinxstylethead{\\relax ')
context += '}'
context += '\\unskip}\\relax '
while self.remember_multirow.get(self.table.col + 1, 0):
self.table.col += 1
self.remember_multirow[self.table.col] -= 1
context += ' & '
context += '&'
if self.remember_multirowcol.get(self.table.col, 0):
extracols = self.remember_multirowcol[self.table.col]
context += ' \\multicolumn{'
context += '\\multicolumn{'
context += str(extracols + 1)
context += '}{l|}{}'
context += '}{l|}{}\\relax '
self.table.col += extracols
if len(node.traverse(nodes.paragraph)) >= 2:
self.table.has_problematic = True