Merging changes

This commit is contained in:
Rob Ruana 2014-01-19 13:44:28 -05:00
commit 4219cd32c8
9 changed files with 41 additions and 64 deletions

47
CHANGES
View File

@ -44,118 +44,83 @@ Bugs fixed
* #1174: Fix smart quotes being applied inside roles like :rst:role:`program` or * #1174: Fix smart quotes being applied inside roles like :rst:role:`program` or
:rst:role:`makevar`. :rst:role:`makevar`.
* #1335: Fix autosummary template overloading with exclamation prefix like * #1335: Fix autosummary template overloading with exclamation prefix like
``{% extends "!autosummary/class.rst" %}`` cause infinite recursive function ``{% extends "!autosummary/class.rst" %}`` cause infinite recursive function
call. This caused by PR#181. call. This was caused by PR#181.
* #1337: Fix autodoc with ``autoclass_content="both"`` uses useless * #1337: Fix autodoc with ``autoclass_content="both"`` uses useless
``object.__init__`` docstring when class does not have ``__init__``. ``object.__init__`` docstring when class does not have ``__init__``.
This was caused by a change for #1138. This was caused by a change for #1138.
* #1340: Can't search alphabetical words on the HTML quick search generated * #1340: Can't search alphabetical words on the HTML quick search generated
with language='ja'. with language='ja'.
* #1319: Do not crash if the :confval:`html_logo` file does not exist. * #1319: Do not crash if the :confval:`html_logo` file does not exist.
* #603: Do not use the HTML-ized title for building the search index (that * #603: Do not use the HTML-ized title for building the search index (that
resulted in "literal" being found on every page with a literal in the resulted in "literal" being found on every page with a literal in the
title). title).
* #751: Allow production lists longer than a page in LaTeX by using longtable. * #751: Allow production lists longer than a page in LaTeX by using longtable.
* #764: Always look for stopwords lowercased in JS search. * #764: Always look for stopwords lowercased in JS search.
* #814: autodoc: Guard against strange type objects that don't have * #814: autodoc: Guard against strange type objects that don't have
``__bases__``. ``__bases__``.
* #932: autodoc: Do not crash if ``__doc__`` is not a string. * #932: autodoc: Do not crash if ``__doc__`` is not a string.
* #933: Do not crash if an :rst:role:`option` value is malformed (contains * #933: Do not crash if an :rst:role:`option` value is malformed (contains
spaces but no option name). spaces but no option name).
* #908: On Python 3, handle error messages from LaTeX correctly in the pngmath * #908: On Python 3, handle error messages from LaTeX correctly in the pngmath
extension. extension.
* #943: In autosummary, recognize "first sentences" to pull from the docstring * #943: In autosummary, recognize "first sentences" to pull from the docstring
if they contain uppercase letters. if they contain uppercase letters.
* #923: Take the entire LaTeX document into account when caching * #923: Take the entire LaTeX document into account when caching
pngmath-generated images. This rebuilds them correctly when pngmath-generated images. This rebuilds them correctly when
:confval:`pngmath_latex_preamble` changes. :confval:`pngmath_latex_preamble` changes.
* #901: Emit a warning when using docutils' new "math" markup without a Sphinx * #901: Emit a warning when using docutils' new "math" markup without a Sphinx
math extension active. math extension active.
* #845: In code blocks, when the selected lexer fails, display line numbers * #845: In code blocks, when the selected lexer fails, display line numbers
nevertheless if configured. nevertheless if configured.
* #929: Support parsed-literal blocks in LaTeX output correctly. * #929: Support parsed-literal blocks in LaTeX output correctly.
* #949: Update the tabulary.sty packed with Sphinx. * #949: Update the tabulary.sty packed with Sphinx.
* #1050: Add anonymous labels into ``objects.inv`` to be referenced via * #1050: Add anonymous labels into ``objects.inv`` to be referenced via
:mod:`~sphinx.ext.intersphinx`. :mod:`~sphinx.ext.intersphinx`.
* #1095: Fix print-media stylesheet being included always in the "scrolls" * #1095: Fix print-media stylesheet being included always in the "scrolls"
theme. theme.
* #1085: Fix current classname not getting set if class description has * #1085: Fix current classname not getting set if class description has
``:noindex:`` set. ``:noindex:`` set.
* #1181: Report option errors in autodoc directives more gracefully. * #1181: Report option errors in autodoc directives more gracefully.
* #1155: Fix autodocumenting C-defined methods as attributes in Python 3. * #1155: Fix autodocumenting C-defined methods as attributes in Python 3.
* #1233: Allow finding both Python classes and exceptions with the "class" and * #1233: Allow finding both Python classes and exceptions with the "class" and
"exc" roles in intersphinx. "exc" roles in intersphinx.
* #1198: Allow "image" for the "figwidth" option of the :rst:dir:`figure` * #1198: Allow "image" for the "figwidth" option of the :rst:dir:`figure`
directive as documented by docutils. directive as documented by docutils.
* #1152: Fix pycode parsing errors of Python 3 code by including two grammar * #1152: Fix pycode parsing errors of Python 3 code by including two grammar
versions for Python 2 and 3, and loading the appropriate version for the versions for Python 2 and 3, and loading the appropriate version for the
running Python version. running Python version.
* #1017: Be helpful and tell the user when the argument to :rst:dir:`option` * #1017: Be helpful and tell the user when the argument to :rst:dir:`option`
does not match the required format. does not match the required format.
* #1345: Fix two bugs with :confval:`nitpick_ignore`; now you don't have to * #1345: Fix two bugs with :confval:`nitpick_ignore`; now you don't have to
remove the store environment for changes to have effect. remove the store environment for changes to have effect.
* #1072: In the JS search, fix issues searching for upper-cased words by * #1072: In the JS search, fix issues searching for upper-cased words by
lowercasing words before stemming. lowercasing words before stemming.
* #1299: Make behavior of the :rst:dir:`math` directive more consistent and * #1299: Make behavior of the :rst:dir:`math` directive more consistent and
avoid producing empty environments in LaTeX output. avoid producing empty environments in LaTeX output.
* #1308: Strip HTML tags from the content of "raw" nodes before feeding it * #1308: Strip HTML tags from the content of "raw" nodes before feeding it
to the search indexer. to the search indexer.
* #1249: Fix duplicate LaTeX page numbering for manual documents. * #1249: Fix duplicate LaTeX page numbering for manual documents.
* #1292: In the linkchecker, retry HEAD requests when denied by HTTP 405. * #1292: In the linkchecker, retry HEAD requests when denied by HTTP 405.
Also make the redirect code apparent and tweak the output a bit to be Also make the redirect code apparent and tweak the output a bit to be
more obvious. more obvious.
* #1285: Avoid name clashes between C domain objects and section titles. * #1285: Avoid name clashes between C domain objects and section titles.
* #848: Always take the newest code in incremental rebuilds with the * #848: Always take the newest code in incremental rebuilds with the
:mod:`sphinx.ext.viewcode` extension. :mod:`sphinx.ext.viewcode` extension.
* #979, #1266: Fix exclude handling in ``sphinx-apidoc``. * #979, #1266: Fix exclude handling in ``sphinx-apidoc``.
* #1302: Fix regression in :mod:`sphinx.ext.inheritance_diagram` when * #1302: Fix regression in :mod:`sphinx.ext.inheritance_diagram` when
documenting classes that can't be pickled. documenting classes that can't be pickled.
* #1316: Remove hard-coded ``font-face`` resources from epub theme. * #1316: Remove hard-coded ``font-face`` resources from epub theme.
* #1329: Fix traceback with empty translation msgstr in .po files. * #1329: Fix traceback with empty translation msgstr in .po files.
* #1300: Fix references not working in translated documents in some instances. * #1300: Fix references not working in translated documents in some instances.
* #1283: Fix a bug in the detection of changed files that would try to access * #1283: Fix a bug in the detection of changed files that would try to access
doctrees of deleted documents. doctrees of deleted documents.
* #1330: Fix :confval:`exclude_patterns` behavior with subdirectories in the
:confval:`html_static_path`.
* #1323: Fix emitting empty ``<ul>`` tags in the HTML writer, which is not
valid HTML.
* #1147: Don't emit a sidebar search box in the "singlehtml" builder.
Documentation Documentation
------------- -------------

View File

@ -15,4 +15,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new # Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: %:
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

View File

@ -141,9 +141,12 @@ tables of contents. The ``toctree`` directive is the central element.
In the end, all documents in the :term:`source directory` (or subdirectories) In the end, all documents in the :term:`source directory` (or subdirectories)
must occur in some ``toctree`` directive; Sphinx will emit a warning if it must occur in some ``toctree`` directive; Sphinx will emit a warning if it
finds a file that is not included, because that means that this file will not finds a file that is not included, because that means that this file will not
be reachable through standard navigation. Use :ref:`metadata` to remove the be reachable through standard navigation.
warning, and :confval:`exclude_patterns` to explicitly exclude documents or
directories from building. Use :confval:`exclude_patterns` to explicitly exclude documents or
directories from building completely. Use :ref:`the "orphan" metadata
<metadata>` to let a document be built, but notify Sphinx that it is not
reachable via a toctree.
The "master document" (selected by :confval:`master_doc`) is the "root" of The "master document" (selected by :confval:`master_doc`) is the "root" of
the TOC tree hierarchy. It can be used as the documentation's main page, or the TOC tree hierarchy. It can be used as the documentation's main page, or

View File

@ -268,7 +268,7 @@ class Builder(object):
# filter "docnames" (list of outdated files) by the updated # filter "docnames" (list of outdated files) by the updated
# found_docs of the environment; this will remove docs that # found_docs of the environment; this will remove docs that
# have since been removed # have since been removed
if docnames != ['__all__']: if docnames and docnames != ['__all__']:
docnames = set(docnames) & self.env.found_docs docnames = set(docnames) & self.env.found_docs
# another indirection to support builders that don't build # another indirection to support builders that don't build

View File

@ -270,6 +270,13 @@ def main(argv):
elif isinstance(err, SphinxError): elif isinstance(err, SphinxError):
print >>error, red('%s:' % err.category) print >>error, red('%s:' % err.category)
print >>error, terminal_safe(unicode(err)) print >>error, terminal_safe(unicode(err))
elif isinstance(err, UnicodeError):
print >>error, red('Encoding error:')
print >>error, terminal_safe(unicode(err))
tbpath = save_traceback(app)
print >>error, red('The full traceback has been saved '
'in %s, if you want to report the '
'issue to the developers.' % tbpath)
else: else:
print >>error, red('Exception occurred:') print >>error, red('Exception occurred:')
print >>error, format_exception_cut_frames().rstrip() print >>error, format_exception_cut_frames().rstrip()

View File

@ -611,11 +611,8 @@ class BuildEnvironment:
pub.process_programmatic_settings(None, self.settings, None) pub.process_programmatic_settings(None, self.settings, None)
pub.set_source(None, src_path.encode(fs_encoding)) pub.set_source(None, src_path.encode(fs_encoding))
pub.set_destination(None, None) pub.set_destination(None, None)
try: pub.publish()
pub.publish() doctree = pub.document
doctree = pub.document
except UnicodeError, err:
raise SphinxError(str(err))
# post-processing # post-processing
self.filter_messages(doctree) self.filter_messages(doctree)

View File

@ -7,7 +7,7 @@
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details. :license: BSD, see LICENSE for details.
#} #}
{%- if pagename != "search" %} {%- if pagename != "search" and builder != "singlehtml" %}
<div id="searchbox" style="display: none" role="search"> <div id="searchbox" style="display: none" role="search">
<h3>{{ _('Quick search') }}</h3> <h3>{{ _('Quick search') }}</h3>
<form class="search" action="{{ pathto('search') }}" method="get"> <form class="search" action="{{ pathto('search') }}" method="get">

View File

@ -158,18 +158,17 @@ def copy_static_entry(source, targetdir, builder, context={},
else: else:
copyfile(source, target) copyfile(source, target)
elif path.isdir(source): elif path.isdir(source):
if level == 0: if not path.isdir(targetdir):
for entry in os.listdir(source): os.mkdir(targetdir)
if entry.startswith('.'): for entry in os.listdir(source):
continue if entry.startswith('.'):
copy_static_entry(path.join(source, entry), targetdir, continue
builder, context, level=1, newtarget = targetdir
exclude_matchers=exclude_matchers) if path.isdir(path.join(source, entry)):
else: newtarget = path.join(targetdir, entry)
target = path.join(targetdir, path.basename(source)) copy_static_entry(path.join(source, entry), newtarget,
if path.exists(target): builder, context, level=level+1,
shutil.rmtree(target) exclude_matchers=exclude_matchers)
shutil.copytree(source, target)
_DEBUG_HEADER = '''\ _DEBUG_HEADER = '''\

View File

@ -240,6 +240,12 @@ class HTMLTranslator(BaseTranslator):
self.body.append('.'.join(map(str, numbers)) + self.body.append('.'.join(map(str, numbers)) +
self.secnumber_suffix) self.secnumber_suffix)
# overwritten to avoid emitting empty <ul></ul>
def visit_bullet_list(self, node):
if len(node) == 1 and node[0].tagname == 'toctree':
raise nodes.SkipNode
BaseTranslator.visit_bullet_list(self, node)
# overwritten # overwritten
def visit_title(self, node): def visit_title(self, node):
BaseTranslator.visit_title(self, node) BaseTranslator.visit_title(self, node)