mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
The arguments of EpubBuilder.build_toc() is deprecated.
This commit is contained in:
parent
d437f39bc4
commit
64533e142c
3
CHANGES
3
CHANGES
@ -59,7 +59,8 @@ Deprecated
|
|||||||
* Support for evaluating Python 2 syntax is deprecated. This includes
|
* Support for evaluating Python 2 syntax is deprecated. This includes
|
||||||
configuration files which should be converted to Python 3.
|
configuration files which should be converted to Python 3.
|
||||||
* The arguments of ``EpubBuilder.build_mimetype()``,
|
* The arguments of ``EpubBuilder.build_mimetype()``,
|
||||||
``EpubBuilder.build_container()``, ``EpubBuilder.bulid_content()``
|
``EpubBuilder.build_container()``, ``EpubBuilder.bulid_content()``,
|
||||||
|
``EpubBuilder.build_toc()``
|
||||||
* The ``encoding`` argument of ``autodoc.Documenter.get_doc()``,
|
* The ``encoding`` argument of ``autodoc.Documenter.get_doc()``,
|
||||||
``autodoc.DocstringSignatureMixin.get_doc()``,
|
``autodoc.DocstringSignatureMixin.get_doc()``,
|
||||||
``autodoc.DocstringSignatureMixin._find_signature()``, and
|
``autodoc.DocstringSignatureMixin._find_signature()``, and
|
||||||
|
@ -243,7 +243,8 @@ The following is a list of deprecated interfaces.
|
|||||||
- N/A
|
- N/A
|
||||||
|
|
||||||
* - arguments of ``EpubBuilder.build_mimetype()``,
|
* - arguments of ``EpubBuilder.build_mimetype()``,
|
||||||
``EpubBuilder.build_container()``, ``EpubBuilder.build_content()``
|
``EpubBuilder.build_container()``, ``EpubBuilder.build_content()``,
|
||||||
|
``EpubBuilder.build_toc()``
|
||||||
- 2.0
|
- 2.0
|
||||||
- 4.0
|
- 4.0
|
||||||
- N/A
|
- N/A
|
||||||
|
@ -706,9 +706,15 @@ class EpubBuilder(StandaloneHTMLBuilder):
|
|||||||
metadata['navpoints'] = navpoints
|
metadata['navpoints'] = navpoints
|
||||||
return metadata
|
return metadata
|
||||||
|
|
||||||
def build_toc(self, outdir, outname):
|
def build_toc(self, outdir=None, outname='toc.ncx'):
|
||||||
# type: (str, str) -> None
|
# type: (str, str) -> None
|
||||||
"""Write the metainfo file toc.ncx."""
|
"""Write the metainfo file toc.ncx."""
|
||||||
|
if outdir:
|
||||||
|
warnings.warn('The arguments of EpubBuilder.build_toc() is deprecated.',
|
||||||
|
RemovedInSphinx40Warning, stacklevel=2)
|
||||||
|
else:
|
||||||
|
outdir = self.outdir
|
||||||
|
|
||||||
logger.info(__('writing %s file...'), outname)
|
logger.info(__('writing %s file...'), outname)
|
||||||
|
|
||||||
if self.config.epub_tocscope == 'default':
|
if self.config.epub_tocscope == 'default':
|
||||||
|
@ -82,7 +82,7 @@ class Epub3Builder(_epub_base.EpubBuilder):
|
|||||||
self.build_container()
|
self.build_container()
|
||||||
self.build_content()
|
self.build_content()
|
||||||
self.build_navigation_doc(self.outdir, 'nav.xhtml')
|
self.build_navigation_doc(self.outdir, 'nav.xhtml')
|
||||||
self.build_toc(self.outdir, 'toc.ncx')
|
self.build_toc()
|
||||||
self.build_epub(self.outdir, self.config.epub_basename + '.epub')
|
self.build_epub(self.outdir, self.config.epub_basename + '.epub')
|
||||||
|
|
||||||
def validate_config_value(self):
|
def validate_config_value(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user