Merge branch '1.6-release'

This commit is contained in:
jfbu 2017-05-05 13:34:47 +02:00
commit f547e59a7a
8 changed files with 40 additions and 16 deletions

22
CHANGES
View File

@ -63,15 +63,20 @@ Deprecated
Features added
--------------
* ``LATEXMKOPTS`` variable for the Makefile in ``$BUILDDIR/latex`` to pass
options to ``latexmk`` when executing ``make latexpdf``. Default is ``-f``.
(refs #3695)
Bugs fixed
----------
* #3588: No compact (p tag) html output in the i18n document build even when
:confval:`html_compact_lists` is True.
* The ``make latexpdf`` (which uses ``latexmk``) aborted earlier in case of
LaTeX errors than was the case with 1.5 series. Now, ``LATEXMKOPTS``
variable is provided whose default value ``-f`` mimics former behaviour.
(refs #3695)
* The ``make latexpdf`` from 1.6b1 (for GNU/Linux and Mac OS, using
``latexmk``) aborted earlier in case of LaTeX errors than was the case with
1.5 series, due to hard-coded usage of ``--halt-on-error`` option. (refs #3695)
* #3683: sphinx.websupport module is not provided by default
* #3683: Failed to build document if builder.css_file.insert() is called
Testing
--------
@ -296,6 +301,8 @@ Bugs fixed
* #3657: EPUB builder crashes if document startswith genindex exists
* #3588: No compact (p tag) html output in the i18n document build even when
:confval:`html_compact_lists` is True.
* #3685: AttributeError when using 3rd party domains
* #3702: LaTeX writer styles figure legends with a hard-coded ``\small``
Testing
--------
@ -496,10 +503,8 @@ Incompatible changes
* QtHelpBuilder doens't generate search page (ref: #2352)
* QtHelpBuilder uses ``nonav`` theme instead of default one
to improve readability.
* latex: To provide good default settings to Japanese docs, Sphinx uses ``jsbook``
as a docclass by default if the ``language`` is ``ja``.
* latex: To provide good default settings to Japanese docs, Sphinx uses
``jreport`` and ``jsbooks`` as a docclass by default if the ``language`` is
* latex: To provide good default settings to Japanese documents, Sphinx uses
``jreport`` and ``jsbook`` as docclass if :confval:`language` is
``ja``.
* ``sphinx-quickstart`` now allows a project version is empty
* Fix :download: role on epub/qthelp builder. They ignore the role because they don't support it.
@ -539,6 +544,7 @@ Incompatible changes
* Emit warnings that will be deprecated in Sphinx 1.6 by default.
Users can change the behavior by setting the environment variable
PYTHONWARNINGS. Please refer :ref:`when-deprecation-warnings-are-displayed`.
* #2454: new JavaScript variable ``SOURCELINK_SUFFIX`` is added
Deprecated
----------

View File

@ -426,7 +426,14 @@ Let us now list some macros from the package file
the new macros are wrappers of the formerly hard-coded ``\texttt``,
``\emph``, ... The default definitions can be found in
:file:`sphinx.sty`.
- paragraph level environments: for each admonition type ``<foo>``, the
- a :dudir:`figure` may have an optional legend with arbitrary body
elements: they are rendered in a ``sphinxlegend`` environment. The default
definition issues ``\small``, and ends with ``\par``.
.. versionadded:: 1.5.6
formerly, the ``\small`` was hardcoded in LaTeX writer and the ending
``\par`` was lacking.
- for each admonition type ``<foo>``, the
used environment is named ``sphinx<foo>``. They may be ``\renewenvironment``
'd individually, and must then be defined with one argument (it is the heading
of the notice, for example ``Warning:`` for :dudir:`warning` directive, if

View File

@ -53,6 +53,7 @@ requires = [
'requests>=2.0.0',
'typing',
'setuptools',
'sphinxcontrib-websupport',
]
extras_require = {
# Environment Marker works for wheel 0.24 or later
@ -60,7 +61,8 @@ extras_require = {
'colorama>=0.3.5',
],
'websupport': [
'sphinxcontrib-websupport',
'sqlalchemy>=0.9',
'whoosh>=2.0',
],
'test': [
'pytest',

View File

@ -100,6 +100,15 @@ class CSSContainer(list):
else:
super(CSSContainer, self).append(Stylesheet(obj, None, 'stylesheet'))
def insert(self, index, obj):
warnings.warn('builder.css_files is deprecated. '
'Please use app.add_stylesheet() instead.',
RemovedInSphinx20Warning)
if isinstance(obj, Stylesheet):
super(CSSContainer, self).insert(index, obj)
else:
super(CSSContainer, self).insert(index, Stylesheet(obj, None, 'stylesheet'))
def extend(self, other):
warnings.warn('builder.css_files is deprecated. '
'Please use app.add_stylesheet() instead.',

View File

@ -1365,6 +1365,8 @@
\protected\def\sphinxstyleliteralstrong {\sphinxbfcode}
\protected\def\sphinxstyleabbreviation {\textsc}
\protected\def\sphinxstyleliteralintitle {\sphinxcode}
% figure legend comes after caption and may contain arbitrary body elements
\newenvironment{sphinxlegend}{\par\small}{\par}
% Tell TeX about pathological hyphenation cases:
\hyphenation{Base-HTTP-Re-quest-Hand-ler}

View File

@ -359,7 +359,8 @@ class DocFieldTransformer(object):
else:
fieldtype, content = entry
fieldtypes = types.get(fieldtype.name, {})
env = self.directive.state.document.settings.env
new_list += fieldtype.make_field(fieldtypes, self.directive.domain,
content, env=self.directive.env)
content, env=env)
node.replace_self(new_list)

View File

@ -1831,12 +1831,10 @@ class LaTeXTranslator(nodes.NodeVisitor):
self.unrestrict_footnote(node)
def visit_legend(self, node):
# type: (nodes.Node) -> None
self.body.append('{\\small ')
self.body.append('\n\\begin{sphinxlegend}')
def depart_legend(self, node):
# type: (nodes.Node) -> None
self.body.append('}')
self.body.append('\\end{sphinxlegend}\n')
def visit_admonition(self, node):
# type: (nodes.Node) -> None

View File

@ -9,7 +9,6 @@ deps=
mock
enum34
typing
sphinxcontrib-websupport
setenv =
SPHINX_TEST_TEMPDIR = {envdir}/testbuild
PYTHONDONTWRITEBYTECODE = true