mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #5106 from tk0miya/5104_broken_apidoc_main
Fix #5104: apidoc: Interface of ``sphinx.apidoc:main()`` has changed
This commit is contained in:
commit
e78133a83e
1
CHANGES
1
CHANGES
@ -32,6 +32,7 @@ Bugs fixed
|
||||
* #5066: html: "relations" sidebar is not shown by default
|
||||
* #5091: latex: curly braces in index entries are not handled correctly
|
||||
* #5070: epub: Wrong internal href fragment links
|
||||
* #5104: apidoc: Interface of ``sphinx.apidoc:main()`` has changed
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -9,20 +9,20 @@
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
from sphinx.deprecation import RemovedInSphinx20Warning
|
||||
from sphinx.ext.apidoc import main as _main
|
||||
|
||||
|
||||
def main(*args, **kwargs):
|
||||
def main(argv=sys.argv):
|
||||
warnings.warn(
|
||||
'`sphinx.apidoc.main()` has moved to `sphinx.ext.apidoc.main()`.',
|
||||
RemovedInSphinx20Warning,
|
||||
stacklevel=2,
|
||||
)
|
||||
args = args[1:] # skip first argument to adjust arguments (refs: #4615)
|
||||
_main(*args, **kwargs)
|
||||
_main(argv[1:]) # skip first argument to adjust arguments (refs: #4615)
|
||||
|
||||
|
||||
# So program can be started with "python -m sphinx.apidoc ..."
|
||||
|
Loading…
Reference in New Issue
Block a user