From 61828786a6036d2919bb43473f2484d8f42b5319 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Thu, 29 Mar 2018 21:55:59 +0900 Subject: [PATCH] Deprecate app.override_domain() --- CHANGES | 1 + doc/extdev/index.rst | 5 +++++ sphinx/application.py | 3 +++ 3 files changed, 9 insertions(+) diff --git a/CHANGES b/CHANGES index 2c553e75e..2fa319435 100644 --- a/CHANGES +++ b/CHANGES @@ -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 `_ diff --git a/doc/extdev/index.rst b/doc/extdev/index.rst index a28d01890..e1ae13be1 100644 --- a/doc/extdev/index.rst +++ b/doc/extdev/index.rst @@ -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 diff --git a/sphinx/application.py b/sphinx/application.py index 5b6842d78..14aa262ec 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -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,