Debian Codegraph @

doc/changes/2.0.rst

raw
1 ==========
2 Sphinx 2.0
3 ==========
4
5
6 Release 2.0.1 (released Apr 08, 2019)
7 =====================================
8
9 Bugs fixed
10 ----------
11
12 * LaTeX: some system labels are not translated
13 * RemovedInSphinx30Warning is marked as pending
14 * deprecation warnings are not emitted
15
16 - ``sphinx.application.CONFIG_FILENAME``
17 - ``sphinx.builders.htmlhelp``
18 - :confval:`!viewcode_import`
19
20 * #6208: C++, properly parse full xrefs that happen to have a short xref as
21 prefix
22 * #6220, #6225: napoleon: AttributeError is raised for raised section having
23 references
24 * #6245: circular import error on importing SerializingHTMLBuilder
25 * #6243: LaTeX: 'releasename' setting for latex_elements is ignored
26 * #6244: html: Search function is broken with 3rd party themes
27 * #6263: html: HTML5Translator crashed with invalid field node
28 * #6262: html theme: The style of field lists has changed in bizstyle theme
29
30 Release 2.0.0 (released Mar 29, 2019)
31 =====================================
32
33 Dependencies
34 ------------
35
36 2.0.0b1
37
38 * LaTeX builder now depends on TeX Live 2015 or above.
39 * LaTeX builder (with ``'pdflatex'`` :confval:`latex_engine`) will process
40 Unicode Greek letters in text (not in math mark-up) via the text font and
41 will not escape them to math mark-up. See the discussion of the
42 ``'fontenc'`` key of :confval:`latex_elements`; such (optional) support for
43 Greek adds, for example on Ubuntu xenial, the ``texlive-lang-greek`` and (if
44 default font set-up is not modified) ``cm-super(-minimal)`` as additional
45 Sphinx LaTeX requirements.
46 * LaTeX builder with :confval:`latex_engine` set to ``'xelatex'`` or to
47 ``'lualatex'`` requires (by default) the ``FreeFont`` fonts,
48 which in Ubuntu xenial are provided by package ``fonts-freefont-otf``, and
49 e.g. in Fedora 29 via package ``texlive-gnu-freefont``.
50 * requests 2.5.0 or above
51 * The six package is no longer a dependency
52 * The sphinxcontrib-websupport package is no longer a dependency
53 * Some packages are separated to sub packages:
54
55 - sphinxcontrib.applehelp
56 - sphinxcontrib.devhelp
57 - sphinxcontrib.htmlhelp
58 - sphinxcontrib.jsmath
59 - sphinxcontrib.serializinghtml
60 - sphinxcontrib.qthelp
61
62 Incompatible changes
63 --------------------
64
65 2.0.0b1
66
67 * Drop python 2.7 and 3.4 support
68 * Drop Docutils 0.11 support
69 * Drop features and APIs deprecated in 1.7.x
70 * The default setting for :confval:`master_doc` is changed to ``'index'`` which
71 has been longly used as default of sphinx-quickstart.
72 * LaTeX: Move message resources to ``sphinxmessage.sty``
73 * LaTeX: Stop using ``\captions<lang>`` macro for some labels
74 * LaTeX: for ``'xelatex'`` and ``'lualatex'``, use the ``FreeFont`` OpenType
75 fonts as default choice (refs: #5645)
76 * LaTeX: ``'xelatex'`` and ``'lualatex'`` now use ``\small`` in code-blocks
77 (due to ``FreeMono`` character width) like ``'pdflatex'`` already did (due
78 to ``Courier`` character width). You may need to adjust this via
79 :confval:`latex_elements` ``'fvset'`` key, in case of usage of some other
80 OpenType fonts (refs: #5768)
81 * LaTeX: Greek letters in text are not escaped to math mode mark-up, and they
82 will use the text font not the math font. The ``LGR`` font encoding must be
83 added to the ``'fontenc'`` key of :confval:`latex_elements` for this to work
84 (only if it is needed by the document, of course).
85 * LaTeX: setting the :confval:`language` to ``'en'`` triggered ``Sonny`` option
86 of ``fncychap``, now it is ``Bjarne`` to match case of no language specified.
87 (refs: #5772)
88 * #5770: doctest: Follow :confval:`highlight_language` on highlighting doctest
89 block. As a result, they are highlighted as python3 by default.
90 * The order of argument for ``HTMLTranslator``, ``HTML5Translator`` and
91 ``ManualPageTranslator`` are changed
92 * LaTeX: hard-coded redefinitions of ``\l@section`` and ``\l@subsection``
93 formerly done during loading of ``'manual'`` docclass get executed later, at
94 time of ``\sphinxtableofcontents``. This means that custom user definitions
95 from LaTeX preamble now get overwritten. Use ``\sphinxtableofcontentshook``
96 to insert custom user definitions. See :ref:`latex-macros`.
97 * quickstart: Simplify generated ``conf.py``
98 * #4148: quickstart: some questions are removed. They are still able to specify
99 via command line options
100 * websupport: unbundled from Sphinx core. Please use sphinxcontrib-websupport
101 * C++, the visibility of base classes is now always rendered as present in the
102 input. That is, ``private`` is now shown, where it was ellided before.
103 * LaTeX: graphics inclusion of oversized images rescales to not exceed
104 the text width and height, even if width and/or height option were used.
105 (refs: #5956)
106 * epub: ``epub_title`` defaults to the :confval:`project` option
107 * #4550: All tables and figures without ``align`` option are displayed to center
108 * #4587: html: Output HTML5 by default
109
110 2.0.0b2
111
112 * texinfo: image files are copied into ``name-figure`` directory
113
114 Deprecated
115 ----------
116
117 2.0.0b1
118
119 * Support for evaluating Python 2 syntax is deprecated. This includes
120 configuration files which should be converted to Python 3.
121 * The arguments of ``EpubBuilder.build_mimetype()``,
122 ``EpubBuilder.build_container()``, ``EpubBuilder.bulid_content()``,
123 ``EpubBuilder.build_toc()`` and ``EpubBuilder.build_epub()``
124 * The arguments of ``Epub3Builder.build_navigation_doc()``
125 * The config variables
126
127 - :confval:`!html_experimental_html5_writer`
128
129 * The ``encoding`` argument of ``autodoc.Documenter.get_doc()``,
130 ``autodoc.DocstringSignatureMixin.get_doc()``,
131 ``autodoc.DocstringSignatureMixin._find_signature()``, and
132 ``autodoc.ClassDocumenter.get_doc()`` are deprecated.
133 * The ``importer`` argument of ``sphinx.ext.autodoc.importer._MockModule``
134 * The ``nodetype`` argument of ``sphinx.search.WordCollector.
135 is_meta_keywords()``
136 * The ``suffix`` argument of ``env.doc2path()`` is deprecated.
137 * The string style ``base`` argument of ``env.doc2path()`` is deprecated.
138 * The fallback to allow omitting the ``filename`` argument from an overridden
139 ``IndexBuilder.feed()`` method is deprecated.
140 * ``sphinx.addnodes.abbreviation``
141 * ``sphinx.application.Sphinx._setting_up_extension``
142 * ``sphinx.builders.epub3.Epub3Builder.validate_config_value()``
143 * ``sphinx.builders.html.SingleFileHTMLBuilder``
144 * ``sphinx.builders.htmlhelp.HTMLHelpBuilder.open_file()``
145 * ``sphinx.cmd.quickstart.term_decode()``
146 * ``sphinx.cmd.quickstart.TERM_ENCODING``
147 * ``sphinx.config.check_unicode()``
148 * ``sphinx.config.string_classes``
149 * ``sphinx.domains.cpp.DefinitionError.description``
150 * ``sphinx.domains.cpp.NoOldIdError.description``
151 * ``sphinx.domains.cpp.UnsupportedMultiCharacterCharLiteral.decoded``
152 * ``sphinx.ext.autodoc.importer._MockImporter``
153 * ``sphinx.ext.autosummary.Autosummary.warn()``
154 * ``sphinx.ext.autosummary.Autosummary.genopt``
155 * ``sphinx.ext.autosummary.Autosummary.warnings``
156 * ``sphinx.ext.autosummary.Autosummary.result``
157 * ``sphinx.ext.doctest.doctest_encode()``
158 * ``sphinx.io.SphinxBaseFileInput``
159 * ``sphinx.io.SphinxFileInput.supported``
160 * ``sphinx.io.SphinxRSTFileInput``
161 * ``sphinx.registry.SphinxComponentRegistry.add_source_input()``
162 * ``sphinx.roles.abbr_role()``
163 * ``sphinx.roles.emph_literal_role()``
164 * ``sphinx.roles.menusel_role()``
165 * ``sphinx.roles.index_role()``
166 * ``sphinx.roles.indexmarkup_role()``
167 * ``sphinx.testing.util.remove_unicode_literal()``
168 * ``sphinx.util.attrdict``
169 * ``sphinx.util.force_decode()``
170 * ``sphinx.util.get_matching_docs()``
171 * ``sphinx.util.inspect.Parameter``
172 * ``sphinx.util.jsonimpl``
173 * ``sphinx.util.osutil.EEXIST``
174 * ``sphinx.util.osutil.EINVAL``
175 * ``sphinx.util.osutil.ENOENT``
176 * ``sphinx.util.osutil.EPIPE``
177 * ``sphinx.util.osutil.walk()``
178 * ``sphinx.util.PeekableIterator``
179 * ``sphinx.util.pycompat.NoneType``
180 * ``sphinx.util.pycompat.TextIOWrapper``
181 * ``sphinx.util.pycompat.UnicodeMixin``
182 * ``sphinx.util.pycompat.htmlescape``
183 * ``sphinx.util.pycompat.indent``
184 * ``sphinx.util.pycompat.sys_encoding``
185 * ``sphinx.util.pycompat.terminal_safe()``
186 * ``sphinx.util.pycompat.u``
187 * ``sphinx.writers.latex.ExtBabel``
188 * ``sphinx.writers.latex.LaTeXTranslator._make_visit_admonition()``
189 * ``sphinx.writers.latex.LaTeXTranslator.babel_defmacro()``
190 * ``sphinx.writers.latex.LaTeXTranslator.collect_footnotes()``
191 * ``sphinx.writers.latex.LaTeXTranslator.generate_numfig_format()``
192 * ``sphinx.writers.texinfo.TexinfoTranslator._make_visit_admonition()``
193 * ``sphinx.writers.text.TextTranslator._make_depart_admonition()``
194 * template variables for LaTeX template
195
196 - ``logo``
197 - ``numfig_format``
198 - ``pageautorefname``
199 - ``translatablestrings``
200
201 For more details, see :ref:`deprecation APIs list <dev-deprecated-apis>`.
202
203 Features added
204 --------------
205
206 2.0.0b1
207
208 * #1618: The search results preview of generated HTML documentation is
209 reader-friendlier: instead of showing the snippets as raw reStructuredText
210 markup, Sphinx now renders the corresponding HTML. This means the Sphinx
211 extension `Sphinx: pretty search results`__ is no longer necessary. Note that
212 changes to the search function of your custom or 3rd-party HTML template might
213 overwrite this improvement.
214
215 __ https://github.com/sphinx-contrib/sphinx-pretty-searchresults
216
217 * #4182: autodoc: Support :confval:`suppress_warnings`
218 * #5533: autodoc: :confval:`autodoc_default_options` supports ``member-order``
219 * #5394: autodoc: Display readable names in type annotations for mocked objects
220 * #5459: autodoc: :confval:`autodoc_default_options` accepts ``True`` as a value
221 * #1148: autodoc: Add :rst:dir:`autodecorator` directive for decorators
222 * #5635: autosummary: Add :confval:`autosummary_mock_imports` to mock external
223 libraries on importing targets
224 * #4018: htmlhelp: Add :confval:`htmlhelp_file_suffix` and
225 :confval:`htmlhelp_link_suffix`
226 * #5559: text: Support complex tables (colspan and rowspan)
227 * LaTeX: support rendering (not in math, yet) of Greek and Cyrillic Unicode
228 letters in non-Cyrillic document even with ``'pdflatex'`` as
229 :confval:`latex_engine` (refs: #5645)
230 * #5660: The ``versionadded``, ``versionchanged`` and ``deprecated`` directives
231 are now generated with their own specific CSS classes
232 (``added``, ``changed`` and ``deprecated``, respectively) in addition to the
233 generic ``versionmodified`` class.
234 * #5841: apidoc: Add --extensions option to sphinx-apidoc
235 * #4981: C++, added an alias directive for inserting lists of declarations,
236 that references existing declarations (e.g., for making a synopsis).
237 * C++: add ``cpp:struct`` to complement ``cpp:class``.
238 * #1341: the HTML search considers words that contain a search term of length
239 three or longer a match.
240 * #4611: epub: Show warning for duplicated ToC entries
241 * #1851: Allow to omit an argument for :rst:dir:`code-block` directive. If
242 omitted, it follows :rst:dir:`highlight` or :confval:`highlight_language`
243 * #4587: html: Add :confval:`!html4_writer` to use old HTML4 writer
244 * #6016: HTML search: A placeholder for the search summary prevents search
245 result links from changing their position when the search terminates. This
246 makes navigating search results easier.
247 * #5196: linkcheck also checks remote images exist
248 * #5924: githubpages: create CNAME file for custom domains when
249 :confval:`html_baseurl` set
250 * #4261: autosectionlabel: restrict the labeled sections by new config value;
251 :confval:`autosectionlabel_maxdepth`
252
253
254 Bugs fixed
255 ----------
256
257 2.0.0b1
258
259 * #1682: LaTeX: writer should not translate Greek unicode, but use textgreek
260 package
261 * #5247: LaTeX: PDF does not build with default font config for Russian
262 language and ``'xelatex'`` or ``'lualatex'`` as :confval:`latex_engine`
263 (refs: #5251)
264 * #5248: LaTeX: Greek letters in section titles disappear from PDF bookmarks
265 * #5249: LaTeX: Unicode Greek letters in math directive break PDF build
266 (fix requires extra set-up, see :confval:`latex_elements` ``'textgreek'`` key
267 and/or :confval:`latex_engine` setting)
268 * #5772: LaTeX: should the Bjarne style of fncychap be used for English also
269 if passed as language option?
270 * #5179: LaTeX: (lualatex only) escaping of ``>`` by ``\textgreater{}`` is not
271 enough as ``\textgreater{}\textgreater{}`` applies TeX-ligature
272 * LaTeX: project name is not escaped if :confval:`latex_documents` omitted
273 * LaTeX: authors are not shown if :confval:`latex_documents` omitted
274 * HTML: Invalid HTML5 file is generated for a glossary having multiple terms for
275 one description (refs: #4611)
276 * QtHelp: OS dependent path separator is used in .qhp file
277 * HTML search: search always returns nothing when multiple search terms are
278 used and one term is shorter than three characters
279
280 2.0.0b2
281
282 * #6096: html: Anchor links are not added to figures
283 * #3620: html: Defer searchindex.js rather than loading it via ajax
284 * #6113: html: Table cells and list items have large margins
285 * #5508: ``linenothreshold`` option for ``highlight`` directive was ignored
286 * texinfo: ``make install-info`` causes syntax error
287 * texinfo: ``make install-info`` fails on macOS
288 * #3079: texinfo: image files are not copied on ``make install-info``
289 * #5391: A cross reference in heading is rendered as literal
290 * #5946: C++, fix ``cpp:alias`` problems in LaTeX (and singlehtml)
291 * #6147: classes attribute of ``citation_reference`` node is lost
292 * AssertionError is raised when custom ``citation_reference`` node having
293 classes attribute refers missing citation (refs: #6147)
294 * #2155: Support ``code`` directive
295 * C++, fix parsing of braced initializers.
296 * #6172: AttributeError is raised for old styled index nodes
297 * #4872: inheritance_diagram: correctly describe behavior of ``parts`` option in
298 docs, allow negative values.
299 * #6178: i18n: Captions missing in translations for hidden TOCs
300
301 2.0.0 final
302
303 * #6196: py domain: unexpected prefix is generated
304
305 Testing
306 -------
307
308 2.0.0b1
309
310 * Stop to use ``SPHINX_TEST_TEMPDIR`` envvar
311
312 2.0.0b2
313
314 * Add a helper function: ``sphinx.testing.restructuredtext.parse()``