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

sphinx_build breaks with sphinx > 2.x #130

Closed
jameshiebert opened this issue Apr 21, 2020 · 1 comment · Fixed by #164
Closed

sphinx_build breaks with sphinx > 2.x #130

jameshiebert opened this issue Apr 21, 2020 · 1 comment · Fixed by #164
Assignees

Comments

@jameshiebert
Copy link
Contributor

I just tried to build the docs on my workstation, which seems to not be working.

(ce-venv) james@basalt:~/code/git/climate-explorer-backend$ python setup.py build_sphinx
running build_sphinx
Running Sphinx v3.0.2

Exception occurred:
  File "/tmp/ce-venv/lib/python3.6/site-packages/sphinx/application.py", line 1069, in add_source_parser
    self.registry.add_source_parser(*args, **kwargs)
TypeError: add_source_parser() takes 2 positional arguments but 3 were given
The full traceback has been saved in /tmp/sphinx-err-9aso6dr3.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

After downgrading Sphinx to 2.4.4 the build works, but we can see a deprecation warning that we have apparently been ignoring:

(ce-venv) james@basalt:~/code/git/climate-explorer-backend$ python setup.py build_sphinx
running build_sphinx
Running Sphinx v2.4.4
/tmp/ce-venv/lib/python3.6/site-packages/m2r.py:652: RemovedInSphinx30Warning: app.add_source_parser() does not support suffix argument. Use app.add_source_suffix() instead.
  app.add_source_parser('.md', M2RParser)
...

I'm not sure where the Markdown parser is configured, so I'm not sure where to point anyone for the solution. @rod-glover , you set this up didn't you?

@corviday
Copy link
Contributor

corviday commented Apr 21, 2020

I set sphinx up in this repository in December as part of the MOTI project, since documenting the API was part of the remit, but its configuration is not adequately robust and it does not behave as expected when built under different conditions: 1, 2. Definitely some more work needed.

We're using the m2r sphinx extension to parse *.md files into *.rst files for sphinx. We haven't pinned m2r, so you presumably have the latest version of m2r on your workstation. m2r may itself need an update, or perhaps there's a different sphinx markdown extension we should use.

@jameshiebert jameshiebert changed the title sphinx_build breaks with sphinx > 2.x #172 sphinx_build breaks with sphinx > 2.x Apr 22, 2020
jameshiebert added a commit that referenced this issue Apr 22, 2020
Temporary fix for #130 to get our CI working until we can address the
root cause (i.e. rid ourselves of deprecated features in Sphinx and do
the upgrade to 3.x)
@cairosanders cairosanders self-assigned this Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants