Skip to content

Commit

Permalink
Merge branch '4.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya committed Jun 1, 2021
2 parents 1f711d0 + 82dad44 commit 711450f
Show file tree
Hide file tree
Showing 122 changed files with 5,536 additions and 5,511 deletions.
5 changes: 5 additions & 0 deletions CHANGES
Expand Up @@ -36,6 +36,7 @@ Deprecated
* The ``app`` argument of ``sphinx.environment.BuildEnvironment`` becomes
required
* ``sphinx.application.Sphinx.html_theme``
* ``sphinx.ext.autosummary._app``
* ``sphinx.util.docstrings.extract_metadata()``

Features added
Expand All @@ -56,6 +57,7 @@ Features added
* #8061, #9218: autodoc: Support variable comment for alias classes
* #3014: autodoc: Add :event:`autodoc-process-bases` to modify the base classes
of the class definitions
* #9272: autodoc: Render enum values for the default argument value better
* #3257: autosummary: Support instance attributes for classes
* #9129: html search: Show search summaries when html_copy_source = False
* #9120: html theme: Eliminate prompt characters of code-block from copyable
Expand All @@ -75,8 +77,11 @@ Bugs fixed
* #8597: autodoc: a docsting having metadata only should be treated as
undocumented
* #9185: autodoc: typehints for overloaded functions and methods are inaccurate
* #9250: autodoc: The inherited method not having docstring is wrongly parsed
* #9270: html theme : pyramid theme generates incorrect logo links
* #9217: manpage: The name of manpage directory that is generated by
:confval:`man_make_section_directory` is not correct
* #9280: py domain: "exceptions" module is not displayed
* #9224: ``:param:`` and ``:type:`` fields does not support a type containing
whitespace (ex. ``Dict[str, str]``)

Expand Down
1 change: 1 addition & 0 deletions EXAMPLES
Expand Up @@ -170,6 +170,7 @@ Documentation using sphinx_rtd_theme
* `Arcade <https://arcade.academy/>`__
* `aria2 <https://aria2.github.io/manual/en/html/>`__
* `ASE <https://wiki.fysik.dtu.dk/ase/>`__
* `asvin <https://asvin.readthedocs.io/>`__
* `Autofac <https://docs.autofac.org/>`__
* `BigchainDB <https://docs.bigchaindb.com/>`__
* `Blender Reference Manual <https://docs.blender.org/manual/>`__
Expand Down
5 changes: 5 additions & 0 deletions doc/extdev/deprecated.rst
Expand Up @@ -32,6 +32,11 @@ The following is a list of deprecated interfaces.
- 6.0
- ``sphinx.registry.SphinxComponentRegistry.html_themes``

* - ``sphinx.ext.autosummary._app``
- 4.1
- 6.0
- N/A

* - ``sphinx.util.docstrings.extract_metadata()``
- 4.1
- 6.0
Expand Down
4 changes: 2 additions & 2 deletions doc/usage/advanced/intl.rst
Expand Up @@ -118,7 +118,7 @@ section describe an easy way to translate with *sphinx-intl*.

#. Translate po files.

AS noted above, these are located in the ``./locale/<lang>/LC_MESSAGES``
As noted above, these are located in the ``./locale/<lang>/LC_MESSAGES``
directory. An example of one such file, from Sphinx, ``builders.po``, is
given below.

Expand Down Expand Up @@ -193,7 +193,7 @@ pot file to the po file, use the :command:`sphinx-intl update` command.

.. code-block:: console
$ sphinx-intl update -p _build/locale
$ sphinx-intl update -p _build/gettext
Using Transifex service for team translation
Expand Down
4 changes: 0 additions & 4 deletions sphinx/deprecation.py
Expand Up @@ -14,10 +14,6 @@
from typing import Any, Dict, Type


class RemovedInSphinx40Warning(DeprecationWarning):
pass


class RemovedInSphinx50Warning(DeprecationWarning):
pass

Expand Down
9 changes: 3 additions & 6 deletions sphinx/domains/python.py
Expand Up @@ -448,12 +448,9 @@ def handle_signature(self, sig: str, signode: desc_signature) -> Tuple[str, str]

if prefix:
signode += addnodes.desc_addname(prefix, prefix)
elif add_module and self.env.config.add_module_names:
if modname and modname != 'exceptions':
# exceptions are a special case, since they are documented in the
# 'exceptions' module.
nodetext = modname + '.'
signode += addnodes.desc_addname(nodetext, nodetext)
elif modname and add_module and self.env.config.add_module_names:
nodetext = modname + '.'
signode += addnodes.desc_addname(nodetext, nodetext)

signode += addnodes.desc_name(name, name)
if arglist:
Expand Down
4 changes: 2 additions & 2 deletions sphinx/ext/autodoc/__init__.py
Expand Up @@ -1704,7 +1704,7 @@ def get_doc(self, ignore: int = None) -> Optional[List[List[str]]]:
__init__ = self.get_attr(self.object, '__init__', None)
initdocstring = getdoc(__init__, self.get_attr,
self.config.autodoc_inherit_docstrings,
self.parent, self.object_name)
self.object, '__init__')
# for new-style classes, no __init__ means default __init__
if (initdocstring is not None and
(initdocstring == object.__init__.__doc__ or # for pypy
Expand All @@ -1715,7 +1715,7 @@ def get_doc(self, ignore: int = None) -> Optional[List[List[str]]]:
__new__ = self.get_attr(self.object, '__new__', None)
initdocstring = getdoc(__new__, self.get_attr,
self.config.autodoc_inherit_docstrings,
self.parent, self.object_name)
self.object, '__new__')
# for new-style classes, no __new__ means default __new__
if (initdocstring is not None and
(initdocstring == object.__new__.__doc__ or # for pypy
Expand Down
13 changes: 9 additions & 4 deletions sphinx/ext/autosummary/__init__.py
Expand Up @@ -72,7 +72,8 @@
from sphinx import addnodes
from sphinx.application import Sphinx
from sphinx.config import Config
from sphinx.deprecation import RemovedInSphinx50Warning
from sphinx.deprecation import (RemovedInSphinx50Warning, RemovedInSphinx60Warning,
deprecated_alias)
from sphinx.environment import BuildEnvironment
from sphinx.environment.adapters.toctree import TocTree
from sphinx.ext.autodoc import INSTANCEATTR, Documenter
Expand Down Expand Up @@ -165,9 +166,13 @@ def autosummary_table_visit_html(self: HTMLTranslator, node: autosummary_table)


# -- autodoc integration -------------------------------------------------------

# current application object (used in `get_documenter()`).
_app: Sphinx = None
deprecated_alias('sphinx.ext.autosummary',
{
'_app': None,
},
RemovedInSphinx60Warning,
{
})


class FakeApplication:
Expand Down
Binary file modified sphinx/locale/ar/LC_MESSAGES/sphinx.mo
Binary file not shown.

0 comments on commit 711450f

Please sign in to comment.