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