merge with stable

This commit is contained in:
shimizukawa 2016-01-13 00:13:35 +09:00
commit f824539119
14 changed files with 47 additions and 27 deletions

27
CHANGES
View File

@ -53,12 +53,19 @@ Documentation
* #1757: Fix for usage of :confval:`html_last_updated_fmt`. Thanks to Ralf Hemmecke.
Release 1.3.4 (in development)
Release 1.3.5 (in development)
==============================
Bugs fixed
----------
Release 1.3.4 (released Jan 12, 2016)
=====================================
Bugs fixed
----------
* #2134: Fix figure caption with reference causes latex build error
* #2094: Fix rubric with reference not working in Latex
* #2147: Fix literalinclude code in latex does not break in pages
@ -102,6 +109,10 @@ Bugs fixed
* #2062: Escape characters in doctests are treated incorrectly with Python 2.
* #2225: Fix if the option does not begin with dash, linking is not performed
* #2226: Fix math is not HTML-encoded when :nowrap: is given (jsmath, mathjax)
* #1601, #2220: 'any' role breaks extended domains behavior. Affected extensions doesn't
support resolve_any_xref and resolve_xref returns problematic node instead of None.
sphinxcontrib-httpdomain is one of them.
* #2229: Fix no warning is given for unknown options
Release 1.3.3 (released Dec 2, 2015)
====================================
@ -156,7 +167,6 @@ Bugs fixed
* #1923: Use babel features only if the babel latex element is nonempty.
* #1942: Fix a KeyError in websupport.
* #1903: Fix strange id generation for glossary terms.
* #1796, On py3, automated .mo building cause UnicodeDecodeError
* ``make text`` will crush if a definition list item has more than 1 classifiers as:
``term : classifier1 : classifier2``.
* #1855: make gettext generates broken po file for definition lists with classifier.
@ -186,7 +196,7 @@ Bugs fixed
Suzumizaki.
* #1818: `sphinx.ext.todo` directive generates broken html class attribute as
'admonition-' when :confval:`language` is specified with non-ASCII linguistic area like
'ru' or 'ja'. To fix this, now ``todo`` directive can use ```:class:`` option.
'ru' or 'ja'. To fix this, now ``todo`` directive can use ``:class:`` option.
* #2140: Fix footnotes in table has broken in LaTeX
* #2127: MecabBinder for html searching feature doesn't work with Python 3.
Thanks to Tomoko Uchida.
@ -995,13 +1005,12 @@ Features added
* Command-line interfaces:
- PR#75: Added ``--follow-links`` option to sphinx-apidoc.
- #869: sphinx-build now has the option :option:`-T` for printing the full
- #869: sphinx-build now has the option ``-T`` for printing the full
traceback after an unhandled exception.
- sphinx-build now supports the standard :option:`--help` and
:option:`--version` options.
- sphinx-build now supports the standard ``--help`` and ``--version`` options.
- sphinx-build now provides more specific error messages when called with
invalid options or arguments.
- sphinx-build now has a verbose option :option:`-v` which can be repeated for
- sphinx-build now has a verbose option ``-v`` which can be repeated for
greater effect. A single occurrence provides a slightly more verbose output
than normal. Two or more occurrences of this option provides more detailed
output which may be useful for debugging.
@ -1023,7 +1032,7 @@ Features added
stemming routines. Saves about 20 seconds when building the Python
documentation.
- PR#108: Add experimental support for parallel building with a new
:option:`-j` option.
:option:`sphinx-build -j` option.
Documentation
-------------
@ -1613,7 +1622,7 @@ Features added
* General:
- Added a "nitpicky" mode that emits warnings for all missing
references. It is activated by the :option:`-n` command-line switch
references. It is activated by the :option:`sphinx-build -n` command-line switch
or the `nitpicky` config value.
- Added ``latexpdf`` target in quickstart Makefile.

View File

@ -234,7 +234,7 @@ General configuration
If true, Sphinx will warn about *all* references where the target cannot be
found. Default is ``False``. You can activate this mode temporarily using
the :option:`-n` command-line switch.
the :option:`-n <sphinx-build -n>` command-line switch.
.. versionadded:: 1.0
@ -580,7 +580,7 @@ that use Sphinx's HTMLWriter class.
A dictionary of values to pass into the template engine's context for all
pages. Single values can also be put in this dictionary using the
:option:`-A` command-line option of ``sphinx-build``.
:option:`-A <sphinx-build -A>` command-line option of ``sphinx-build``.
.. versionadded:: 0.5

View File

@ -97,8 +97,8 @@ There are also these new config values:
Since this setting is not portable from system to system, it is normally not
useful to set it in ``conf.py``; rather, giving it on the
:program:`sphinx-build` command line via the :option:`-D` option should be
preferable, like this::
:program:`sphinx-build` command line via the :option:`-D <sphinx-build -D>`
option should be preferable, like this::
sphinx-build -b html -D graphviz_dot=C:\graphviz\bin\dot.exe . _build/html

View File

@ -124,8 +124,8 @@ built:
Since this setting is not portable from system to system, it is normally not
useful to set it in ``conf.py``; rather, giving it on the
:program:`sphinx-build` command line via the :option:`-D` option should be
preferable, like this::
:program:`sphinx-build` command line via the :option:`-D <sphinx-build -D>`
option should be preferable, like this::
sphinx-build -b html -D imgmath_latex=C:\tex\latex.exe . _build/html

View File

@ -63,7 +63,7 @@ be translated you need to follow these instructions:
msgfmt "usage.po" -o "locale/es/LC_MESSAGES/usage.mo"
* Set :confval:`locale_dirs` to ``["locale/"]``.
* Set :confval:`language` to ``es`` (also possible via :option:`-D`).
* Set :confval:`language` to ``es`` (also possible via :option:`-D <sphinx-build -D>`).
* Run your desired build.

View File

@ -122,8 +122,9 @@ this::
$ sphinx-build -b html sourcedir builddir
where *sourcedir* is the :term:`source directory`, and *builddir* is the
directory in which you want to place the built documentation. The :option:`-b`
option selects a builder; in this example Sphinx will build HTML files.
directory in which you want to place the built documentation.
The :option:`-b <sphinx-build -b>` option selects a builder; in this example
Sphinx will build HTML files.
|more| See :ref:`invocation` for all options that :program:`sphinx-build`
supports.

View File

@ -453,7 +453,7 @@ class StandardDomain(Domain):
'productionlist': ProductionList,
}
roles = {
'option': OptionXRefRole(),
'option': OptionXRefRole(warn_dangling=True),
'envvar': EnvVarXRefRole(),
# links to tokens in grammar productions
'token': XRefRole(),
@ -491,6 +491,7 @@ class StandardDomain(Domain):
'the label must precede a section header)',
'numref': 'undefined label: %(target)s',
'keyword': 'unknown keyword: %(target)s',
'option': 'unknown option: %(target)s',
}
def clear_doc(self, docname):

View File

@ -1656,7 +1656,7 @@ class BuildEnvironment:
for role in domain.roles:
res = domain.resolve_xref(self, refdoc, builder, role, target,
node, contnode)
if res:
if res and isinstance(res[0], nodes.Element):
results.append(('%s:%s' % (domain.name, role), res))
# now, see how many matches we got...
if not results:

View File

@ -43,9 +43,11 @@ class NestedInlineTransform(object):
Flatten nested inline nodes:
Before:
<strong>foo=<emphasis>1</emphasis>&bar=<emphasis>2</emphasis></strong>
<strong>foo=<emphasis>1</emphasis>
&bar=<emphasis>2</emphasis></strong>
After:
<strong>foo=</strong><emphasis>var</emphasis><strong>&bar=</strong><emphasis>2</emphasis>
<strong>foo=</strong><emphasis>var</emphasis>
<strong>&bar=</strong><emphasis>2</emphasis>
"""
def __init__(self, document):
self.document = document

View File

@ -38,6 +38,7 @@ with "\\?": b?'here: >>>(\\\\|/)xbb<<<'
HTML_WARNINGS = ENV_WARNINGS + """\
%(root)s/images.txt:20: WARNING: no matching candidate for image URI u'foo.\\*'
None:\\d+: WARNING: citation not found: missing
%(root)s/markup.txt:158: WARNING: unknown option: &option
%(root)s/markup.txt:: WARNING: invalid single index entry u''
%(root)s/markup.txt:: WARNING: invalid pair index entry u''
%(root)s/markup.txt:: WARNING: invalid pair index entry u'keyword; '

View File

@ -24,6 +24,7 @@ from test_build_html import ENV_WARNINGS
LATEX_WARNINGS = ENV_WARNINGS + """\
None:None: WARNING: unknown option: &option
None:None: WARNING: citation not found: missing
None:None: WARNING: no matching candidate for image URI u'foo.\\*'
WARNING: invalid pair index entry u''
@ -393,7 +394,8 @@ def test_latex_show_urls_is_footnote(app, status, warning):
'\\leavevmode\\footnotetext[7]{\nhttp://sphinx-doc.org/\n}\nDescription' in result)
assert ('\\item[{Footnote in term \\protect\\footnotemark[9]}] '
'\\leavevmode\\footnotetext[9]{\nFootnote in term\n}\nDescription' in result)
assert ('\\item[{\\href{http://sphinx-doc.org/}{Term in deflist}\\protect\\footnotemark[8]}] '
assert ('\\item[{\\href{http://sphinx-doc.org/}{Term in deflist}\\protect'
'\\footnotemark[8]}] '
'\\leavevmode\\footnotetext[8]{\nhttp://sphinx-doc.org/\n}\nDescription' in result)
assert ('\\href{https://github.com/sphinx-doc/sphinx}'
'{https://github.com/sphinx-doc/sphinx}\n' in result)
@ -433,9 +435,11 @@ def test_image_in_section(app, status, warning):
print(result)
print(status.getvalue())
print(warning.getvalue())
assert ('\chapter[Test section]{\includegraphics[width=15pt,height=15pt]{{pic}.png} Test section}'
assert ('\chapter[Test section]'
'{\includegraphics[width=15pt,height=15pt]{{pic}.png} Test section}'
in result)
assert ('\chapter[Other {[}blah{]} section]{Other {[}blah{]} \includegraphics[width=15pt,height=15pt]{{pic}.png} section}' in result)
assert ('\chapter[Other {[}blah{]} section]{Other {[}blah{]} '
'\includegraphics[width=15pt,height=15pt]{{pic}.png} section}' in result)
assert ('\chapter{Another section}' in result)

View File

@ -23,6 +23,7 @@ from test_build_html import ENV_WARNINGS
TEXINFO_WARNINGS = ENV_WARNINGS + """\
None:None: WARNING: unknown option: &option
None:None: WARNING: citation not found: missing
None:None: WARNING: no matching candidate for image URI u'foo.\\*'
None:None: WARNING: no matching candidate for image URI u'svgimg.\\*'

View File

@ -15,7 +15,8 @@ def test_encode_uri():
expected = (u'https://ru.wikipedia.org/wiki/%D0%A1%D0%B8%D1%81%D1%82%D0%B5%D0%BC%D0%B0_'
u'%D1%83%D0%BF%D1%80%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D1%8F_'
u'%D0%B1%D0%B0%D0%B7%D0%B0%D0%BC%D0%B8_%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85')
uri = u'https://ru.wikipedia.org/wiki/Система_управления_базами_данных'
uri = (u'https://ru.wikipedia.org/wiki'
u'/Система_управления_базами_данных')
assert expected, encode_uri(uri)
expected = (u'https://github.com/search?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+is%3A'

View File

@ -81,7 +81,7 @@ def check_syntax(fn, lines):
@checker('.py')
def check_style(fn, lines):
for lno, line in enumerate(lines):
if len(line) > 95:
if len(line.rstrip('\n')) > 95:
yield lno+1, "line too long"
if line.strip().startswith('#'):
continue