You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Fedora we've been working off of a docutils snapshot as we try to get our Linux distro prepared for Python-3.3. We noticed that there's a change to the docutils manpage writer that will break sphinx's manpage generation. Part of the docutils change increments the indent level when visit_admonition() is called and decrements the indent level when depart_admonition() is called.
Sphinx has its own manpage writer that customizes several aspects of the docutils manpage writer. One of those is to override visit_admonition() to add some new labels for admonitions. However, it does not also override depart_admonition(). This leads to a problem with the new version of docutils where the indent level is decremented past the top level leading to a traceback:
File "/usr/lib/python2.7/site-packages/docutils/writers/manpage.py", line 877, in dedent
self._indent.pop()
IndexError: pop from empty list
There's two ways that I see to rework this.
override depart_admonition() as well so that you can tell it not to decrement the indent level.
Instead of overriding visit_admonition(), add the additional labels to the data structure that docutils.writers.manpage will use.
In Fedora we've been working off of a docutils snapshot as we try to get our Linux distro prepared for Python-3.3. We noticed that there's a change to the docutils manpage writer that will break sphinx's manpage generation. Part of the docutils change increments the indent level when visit_admonition() is called and decrements the indent level when depart_admonition() is called.
Sphinx has its own manpage writer that customizes several aspects of the docutils manpage writer. One of those is to override visit_admonition() to add some new labels for admonitions. However, it does not also override depart_admonition(). This leads to a problem with the new version of docutils where the indent level is decremented past the top level leading to a traceback:
File "/usr/lib/python2.7/site-packages/docutils/writers/manpage.py", line 877, in dedent
self._indent.pop()
IndexError: pop from empty list
There's two ways that I see to rework this.
I'll attach a patch to do the latter.
The text was updated successfully, but these errors were encountered: