mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Deprecate the old IndexBuilder.feed() method signature
The method signature changed in commit
d27386cc95
(Jun 8, 2016).
This commit is contained in:
parent
30ec4b6bba
commit
c4baa7234e
2
CHANGES
2
CHANGES
@ -51,6 +51,8 @@ Deprecated
|
|||||||
is_meta_keywords()``
|
is_meta_keywords()``
|
||||||
* The ``suffix`` argument of ``env.doc2path()`` is deprecated.
|
* The ``suffix`` argument of ``env.doc2path()`` is deprecated.
|
||||||
* The string style ``base`` argument of ``env.doc2path()`` is deprecated.
|
* The string style ``base`` argument of ``env.doc2path()`` is deprecated.
|
||||||
|
* The fallback to allow omitting the ``filename`` argument from an overridden
|
||||||
|
``IndexBuilder.feed()`` method is deprecated.
|
||||||
* ``sphinx.addnodes.abbreviation``
|
* ``sphinx.addnodes.abbreviation``
|
||||||
* ``sphinx.application.Sphinx._setting_up_extension``
|
* ``sphinx.application.Sphinx._setting_up_extension``
|
||||||
* ``sphinx.config.check_unicode()``
|
* ``sphinx.config.check_unicode()``
|
||||||
|
@ -237,6 +237,12 @@ The following is a list of deprecated interfaces.
|
|||||||
- 4.0
|
- 4.0
|
||||||
- N/A
|
- N/A
|
||||||
|
|
||||||
|
* - Omitting the ``filename`` argument in an overriddent
|
||||||
|
``IndexBuilder.feed()`` method.
|
||||||
|
- 2.0
|
||||||
|
- 4.0
|
||||||
|
- ``IndexBuilder.feed(docname, filename, title, doctree)``
|
||||||
|
|
||||||
* - ``sphinx.writers.latex.LaTeXTranslator.babel_defmacro()``
|
* - ``sphinx.writers.latex.LaTeXTranslator.babel_defmacro()``
|
||||||
- 2.0
|
- 2.0
|
||||||
- 4.0
|
- 4.0
|
||||||
|
@ -32,7 +32,7 @@ from sphinx import package_dir, __display_version__
|
|||||||
from sphinx.application import ENV_PICKLE_FILENAME
|
from sphinx.application import ENV_PICKLE_FILENAME
|
||||||
from sphinx.builders import Builder
|
from sphinx.builders import Builder
|
||||||
from sphinx.config import string_classes
|
from sphinx.config import string_classes
|
||||||
from sphinx.deprecation import RemovedInSphinx30Warning
|
from sphinx.deprecation import RemovedInSphinx30Warning, RemovedInSphinx40Warning
|
||||||
from sphinx.environment.adapters.asset import ImageAdapter
|
from sphinx.environment.adapters.asset import ImageAdapter
|
||||||
from sphinx.environment.adapters.indexentries import IndexEntries
|
from sphinx.environment.adapters.indexentries import IndexEntries
|
||||||
from sphinx.environment.adapters.toctree import TocTree
|
from sphinx.environment.adapters.toctree import TocTree
|
||||||
@ -977,6 +977,12 @@ class StandaloneHTMLBuilder(Builder):
|
|||||||
except TypeError:
|
except TypeError:
|
||||||
# fallback for old search-adapters
|
# fallback for old search-adapters
|
||||||
self.indexer.feed(pagename, title, doctree) # type: ignore
|
self.indexer.feed(pagename, title, doctree) # type: ignore
|
||||||
|
indexer_name = self.indexer.__class__.__name__
|
||||||
|
warnings.warn(
|
||||||
|
'The %s.feed() method signature is deprecated. Update to '
|
||||||
|
'%s.feed(docname, filename, title, doctree).' % (
|
||||||
|
indexer_name, indexer_name),
|
||||||
|
RemovedInSphinx40Warning)
|
||||||
|
|
||||||
def _get_local_toctree(self, docname, collapse=True, **kwds):
|
def _get_local_toctree(self, docname, collapse=True, **kwds):
|
||||||
# type: (str, bool, Any) -> str
|
# type: (str, bool, Any) -> str
|
||||||
|
Loading…
Reference in New Issue
Block a user