alex-rudakov / sphinx-argparse

Sphinx extension that automatically document argparse commands and options
MIT License
49 stars 40 forks source link

Issues with RTD and CommonMark > 0.5.6 #74

Closed MikeDacre closed 6 years ago

MikeDacre commented 7 years ago

Recently RTD just stopped building my docs with the following error:

python /home/docs/checkouts/readthedocs.org/user_builds/fyrd/envs/dev/bin/sphinx-build -T -E -b readthedocs -d _build/doctrees-readthedocs -D language=en . _build/html

Running Sphinx v1.5.3
making output directory...

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/fyrd/envs/dev/lib/python3.5/site-packages/sphinx/application.py", line 512, in setup_extension
    mod = __import__(extension, None, None, ['setup'])
  File "/home/docs/checkouts/readthedocs.org/user_builds/fyrd/envs/dev/lib/python3.5/site-packages/sphinxarg/ext.py", line 13, in <module>
    from sphinxarg.markdown import parseMarkDownBlock
  File "/home/docs/checkouts/readthedocs.org/user_builds/fyrd/envs/dev/lib/python3.5/site-packages/sphinxarg/markdown.py", line 1, in <module>
    from CommonMark import Parser  # >= 0.5.6
ImportError: cannot import name 'Parser'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/fyrd/envs/dev/lib/python3.5/site-packages/sphinx/cmdline.py", line 295, in main
    opts.warningiserror, opts.tags, opts.verbosity, opts.jobs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/fyrd/envs/dev/lib/python3.5/site-packages/sphinx/application.py", line 199, in __init__
    self.setup_extension(extension)
  File "/home/docs/checkouts/readthedocs.org/user_builds/fyrd/envs/dev/lib/python3.5/site-packages/sphinx/application.py", line 516, in setup_extension
    err)
sphinx.errors.ExtensionError: Could not import extension sphinxarg.ext (exception: cannot import name 'Parser')

Extension error:
Could not import extension sphinxarg.ext (exception: cannot import name 'Parser')

image

I also reported the on the RTD issue tracker here: https://github.com/rtfd/readthedocs.org/issues/3032

vingar commented 6 years ago

Would you have a workaround for this problem on rtd ? Does it need a new sphinx-argparse version relaxing the dependency on CommonMark ?

Thanks