Deprecate string style base for env.doc2path()

This commit is contained in:
Takeshi KOMIYA 2018-09-02 11:32:01 +09:00
parent 8bd2f921f9
commit 0e4c23fc35
3 changed files with 9 additions and 0 deletions

View File

@ -16,6 +16,7 @@ Deprecated
----------
* The ``suffix`` argument of ``env.doc2path()`` is deprecated.
* The string style ``base`` argument of ``env.doc2path()`` is deprecated.
* ``sphinx.ext.doctest.doctest_encode()``
* ``sphinx.testing.util.remove_unicode_literal()``

View File

@ -121,6 +121,11 @@ The following is a list of deprecated interface.
- 4.0
- N/A
* - string style ``base`` argument of ``BuildEnvironment.doc2path()``
- 2.0
- 4.0
- ``os.path.join()``
* - ``sphinx.ext.doctest.doctest_encode()``
- 2.0
- 4.0

View File

@ -342,6 +342,9 @@ class BuildEnvironment(object):
if suffix:
warnings.warn('The suffix argument for doc2path() is deprecated.',
RemovedInSphinx40Warning)
if base not in (True, None):
warnings.warn('The string style base argument for doc2path() is deprecated.',
RemovedInSphinx40Warning)
docname = docname.replace(SEP, path.sep)
if suffix is None: