Since 3.0.1, the term role has matched to the words in glossary
case-sensitively. It's important change for preventing conflicts by
word cases. But, it also brings a problem for references in natural
text.
This optimizes the case-insensitive match of the term role. It allows
to search glossary words twice with no performance penalty; the first
search is case sensitive and another is case insenstive.
Opening and closing a file requires processing from the operating
system. Repeatedly opening and closing wastes system resources and
hinders buffering, causing a flush (disk I/O) after each write
operation.
Using a context manager ensures the logs are flushed to disk and files
are properly closed whether the program exists successfully or an
exception occurs. Compared to the previous implementation, a brutal
shutdown of the machine (e.g. power cord disconnected) could cause some
log lines not to be written. That should not be an issue in practice.
Now, files are created and truncated when linkcheck submitted the links
to check to the threads and is ready to process the results, instead of
when the builder is constructed. It keeps the file operations closer to
their use.
autodoc crashed when a decorator in mocked module takes arguments
because mock system returns the first argument for the decorator as a
decorated object.
This changes the approach for mocking decorators that remembers
arguments for each decoration, and fetch the latest argument on
generating document.
Add new configuration variables: `html_permalinks` and
`html_permalinks_icon`.
This refines the settings around HTML permalinks.
* html_add_permalinks
* Deprecated.
* html_permalinks
* Enable or disable permalinks feature.
* html_permalinks_icon
* Change the icon for permalinks
Prior to this the depth of the bookmarks is too low, one does not even
get to see for example what are the built-in extensions offered by
Sphinx.
Similarly the LaTeX created table of contents has not enough depth.
Dozens of contiguous pages from our documentation get only a single
link, it is very hard for newcomer to get some feeling of the scope of
Sphinx. With a more detailed table of contents (be it inside the PDF or
via the collapsable bookmark panel of PDF viewer) learning Sphinx is
easier.
It is hard to provide a unit test, because the problem only raises a
LaTeX warning and shows as broken internal links in pdf output.
As the fix moves some LaTeX code to the end of preamble, user or
extension code may have to be moved there too. However, a large part of
it already was delayed. I checked that sphinxmessages.tex does not
introduce preamble code which would be broken from missing macros due
to this change.
sphinx-apidoc should generate a namespace module file when
`--implicit-namespace` option given. This fixes the case the namespace
module has subpackages, but no submodules.