Builds fail when using MyST and autodoc with `docutils==0.17` installed
See original GitHub issueWith docutils==0.17
(but not earlier), builds fail when using MyST alongside the autodoc
extension, invoked via an eval-rst
directive.
To reproduce, create this conf.py
import sys
sys.path.insert(0, '.')
extensions = ['myst_parser', 'sphinx.ext.autodoc']
this index.md
```{eval-rst}
.. automodule:: module
```
and this module.py
"""Lorem ipsum."""
Then run sphinx-build . output
inside that folder. With docutils==0.16
installed, this renders as expected: A page that just says “Lorem ipsum.”
With docutils==0.17
(released a couple of days ago), I get this error:
Exception occurred:
File "c:\programs\python\lib\site-packages\docutils\parsers\rst\__init__.py", line 196, in parse
if len(line) > self.document.settings.line_length_limit:
AttributeError: 'Values' object has no attribute 'line_length_limit'
If I run the same build without the MyST parser, i.e. instead of index.md
I have index.rst
with .. automodule:: module
in it, then things are fine again.
My environment is Sphinx 3.5.3, MyST 0.13.5, Python 3.9.2, Windows 10. But the same error occurs when Read-the-Docs builds my project on its server with sphinx>=2.0.0
required.
A similar issue with docutils==0.17
has been reported for recommonmark in readthedocs/recommonmark#220.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:5 (3 by maintainers)
Top GitHub Comments
See #344
Hey yeh I have an idea of how to fix this. I’ve been side-tracked, messing around with some other stuff, but should be able to address this in the next day or two 👍