mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
The arguments of Epub3Builder.build_navigation_doc() is deprecated.
This commit is contained in:
parent
b6c422ac86
commit
e82f5ddb55
1
CHANGES
1
CHANGES
@ -61,6 +61,7 @@ Deprecated
|
|||||||
* 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()`` and ``EpubBuilder.build_epub()``
|
``EpubBuilder.build_toc()`` and ``EpubBuilder.build_epub()``
|
||||||
|
* The arguments of ``Epub3Builder.build_navigation_doc()``
|
||||||
* 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
|
||||||
|
@ -249,6 +249,11 @@ The following is a list of deprecated interfaces.
|
|||||||
- 4.0
|
- 4.0
|
||||||
- N/A
|
- N/A
|
||||||
|
|
||||||
|
* - arguments of ``Epub3Builder.build_navigation_doc()``
|
||||||
|
- 2.0
|
||||||
|
- 4.0
|
||||||
|
- N/A
|
||||||
|
|
||||||
* - ``nodetype`` argument of
|
* - ``nodetype`` argument of
|
||||||
``sphinx.search.WordCollector.is_meta_keywords()``
|
``sphinx.search.WordCollector.is_meta_keywords()``
|
||||||
- 2.0
|
- 2.0
|
||||||
|
@ -9,12 +9,14 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import warnings
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
from sphinx import package_dir
|
from sphinx import package_dir
|
||||||
from sphinx.builders import _epub_base
|
from sphinx.builders import _epub_base
|
||||||
from sphinx.config import ENUM
|
from sphinx.config import ENUM
|
||||||
|
from sphinx.deprecation import RemovedInSphinx40Warning
|
||||||
from sphinx.locale import __
|
from sphinx.locale import __
|
||||||
from sphinx.util import logging, xmlname_checker
|
from sphinx.util import logging, xmlname_checker
|
||||||
from sphinx.util.fileutil import copy_asset_file
|
from sphinx.util.fileutil import copy_asset_file
|
||||||
@ -81,7 +83,7 @@ class Epub3Builder(_epub_base.EpubBuilder):
|
|||||||
self.build_mimetype()
|
self.build_mimetype()
|
||||||
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.build_toc()
|
self.build_toc()
|
||||||
self.build_epub()
|
self.build_epub()
|
||||||
|
|
||||||
@ -202,9 +204,15 @@ class Epub3Builder(_epub_base.EpubBuilder):
|
|||||||
metadata['navlist'] = navlist
|
metadata['navlist'] = navlist
|
||||||
return metadata
|
return metadata
|
||||||
|
|
||||||
def build_navigation_doc(self, outdir, outname):
|
def build_navigation_doc(self, outdir=None, outname='nav.xhtml'):
|
||||||
# type: (str, str) -> None
|
# type: (str, str) -> None
|
||||||
"""Write the metainfo file nav.xhtml."""
|
"""Write the metainfo file nav.xhtml."""
|
||||||
|
if outdir:
|
||||||
|
warnings.warn('The arguments of Epub3Builder.build_navigation_doc() '
|
||||||
|
'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':
|
||||||
|
Loading…
Reference in New Issue
Block a user