Deprecate app.override_domain()

This commit is contained in:
Takeshi KOMIYA 2018-03-29 21:55:59 +09:00
parent 42263a07a6
commit 61828786a6
3 changed files with 9 additions and 0 deletions

View File

@ -32,6 +32,7 @@ Deprecated
deprecated
* ``sphinx.locale.l_()`` is deprecated
* #2157: helper function ``warn()`` for HTML themes is deprecated
* ``app.override_domain()`` is deprecated
For more details, see `deprecation APIs list
<http://www.sphinx-doc.org/en/master/extdev/index.html#deprecated-apis>`_

View File

@ -113,6 +113,11 @@ The following is a list of deprecated interface.
- (will be) Removed
- Alternatives
* - ``sphinx.application.Sphinx.override_domain()``
- 1.8
- 3.0
- :meth:`~sphinx.application.Sphinx.add_domain()`
* - ``warn()`` (template helper function)
- 1.8
- 3.0

View File

@ -787,6 +787,9 @@ class Sphinx(object):
.. deprecated:: 1.8
Integrated to :meth:`add_domain`.
"""
warnings.warn('app.override_domain() is deprecated. '
'Use app.add_domain() with override option instead.',
RemovedInSphinx30Warning)
self.registry.add_domain(domain, override=True)
def add_directive_to_domain(self, domain, name, obj, has_content=None, argument_spec=None,