Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

semantics of sphinx.main was changed when sphinx.cmd.build.main was introduced #5125

Closed
guyer opened this issue Jun 27, 2018 · 1 comment
Closed

Comments

@guyer
Copy link

guyer commented Jun 27, 2018

Subject:

Problem

As discussed in #4615, prior to 89f9c7c, sphinx.main took a list as its argument:

def main(argv=sys.argv[1:])

Afterwards, it took a variable number of arguments and passed them on to sphinx.cmd.build.main

def main(*args, **kwargs)

With b5bae23, though

args = args[1:]

throws everything away, because args is not a list, it's a tuple that holds a list.

Procedure to reproduce the problem

>>> import sphinx
>>> sphinx.main(['sphinx_build', '-b', 'html', '-c', 'documentation/', '.', 'documentation/_build/html'])

Error logs / results

usage:  [OPTIONS] SOURCEDIR OUTPUTDIR [FILENAMES...]
: error: too few arguments

Expected results

If sphinx.main is being deprecated anyway, it should retain the sematics it always had:

def main(argv=sys.argv[1:])

Reproducible project / your project

usnistgov/fipy@71c48d9037

invoke

python setup.py build_docs --html

Environment info

  • OS: Mac 10.13.5 (doesn't matter)
  • Python version: 2.7.15
  • Sphinx version: 1.7.5
tk0miya added a commit to tk0miya/sphinx that referenced this issue Jun 29, 2018
@tk0miya tk0miya added this to the 1.7.6 milestone Jun 29, 2018
tk0miya added a commit that referenced this issue Jul 12, 2018
Fix #5125: sphinx-build: Interface of ``sphinx:main()`` has changed
@tk0miya
Copy link
Member

tk0miya commented Jul 12, 2018

Fixed by #5131.
Thank you for reporting

@tk0miya tk0miya closed this as completed Jul 12, 2018
guyer added a commit to guyer/fipy that referenced this issue Aug 29, 2018
Sphinx broke its api.
See, e.g., sphinx-doc/sphinx#5125.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants