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

pin to specific Sphinx version and older docutils for building docs #747

Merged
merged 1 commit into from Oct 28, 2021

Conversation

boegel
Copy link
Member

@boegel boegel commented Oct 28, 2021

Building the docs fails currently on ReadTheDocs because of an incompatibility with the fixed Sphinx 1.8.5 version and the latest docutils that gets installed (details below).

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/easybuild/envs/develop/lib/python3.7/site-packages/sphinx/cmd/build.py", line 304, in build_main
    app.build(args.force_all, filenames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/easybuild/envs/develop/lib/python3.7/site-packages/sphinx/application.py", line 341, in build
    self.builder.build_update()
  File "/home/docs/checkouts/readthedocs.org/user_builds/easybuild/envs/develop/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 347, in build_update
    len(to_build))
  File "/home/docs/checkouts/readthedocs.org/user_builds/easybuild/envs/develop/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 360, in build
    updated_docnames = set(self.read())
  File "/home/docs/checkouts/readthedocs.org/user_builds/easybuild/envs/develop/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 468, in read
    self._read_serial(docnames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/easybuild/envs/develop/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 490, in _read_serial
    self.read_doc(docname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/easybuild/envs/develop/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 534, in read_doc
    doctree = read_doc(self.app, self.env, self.env.doc2path(docname))
  File "/home/docs/checkouts/readthedocs.org/user_builds/easybuild/envs/develop/lib/python3.7/site-packages/sphinx/io.py", line 318, in read_doc
    pub.publish()
  File "/home/docs/checkouts/readthedocs.org/user_builds/easybuild/envs/develop/lib/python3.7/site-packages/docutils/core.py", line 219, in publish
    self.apply_transforms()
  File "/home/docs/checkouts/readthedocs.org/user_builds/easybuild/envs/develop/lib/python3.7/site-packages/docutils/core.py", line 200, in apply_transforms
    self.document.transformer.apply_transforms()
  File "/home/docs/checkouts/readthedocs.org/user_builds/easybuild/envs/develop/lib/python3.7/site-packages/sphinx/transforms/__init__.py", line 90, in apply_transforms
    Transformer.apply_transforms(self)
  File "/home/docs/checkouts/readthedocs.org/user_builds/easybuild/envs/develop/lib/python3.7/site-packages/docutils/transforms/__init__.py", line 171, in apply_transforms
    transform.apply(**kwargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/easybuild/envs/develop/lib/python3.7/site-packages/sphinx/transforms/__init__.py", line 245, in apply
    apply_source_workaround(n)
  File "/home/docs/checkouts/readthedocs.org/user_builds/easybuild/envs/develop/lib/python3.7/site-packages/sphinx/util/nodes.py", line 94, in apply_source_workaround
    for classifier in reversed(node.parent.traverse(nodes.classifier)):
TypeError: 'generator' object is not reversible

The problem is discussed in sphinx-doc/sphinx#9727, pinning to an old docutils version should fix the problem. Sphinx is also being pinned to 1.8.5, since that's the default for old ReadTheDocs projects (see https://docs.readthedocs.io/en/stable/builds.html#python).

@boegel boegel added the bug fix label Oct 28, 2021
@boegel boegel added this to the ASAP milestone Oct 28, 2021
@branfosj branfosj merged commit 529e1b1 into easybuilders:develop Oct 28, 2021
@boegel boegel deleted the docs_pin_sphinx branch October 28, 2021 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants