Bug 850551 - Sphinx manpage generation is broken with the new docutils package
Summary: Sphinx manpage generation is broken with the new docutils package
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-sphinx
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michel Lind
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-21 20:03 UTC by Toshio Ernie Kuratomi
Modified: 2012-09-17 22:25 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-09-17 22:25:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to add sphinx admonition labels instead of overriding visit_admonition() (1.22 KB, patch)
2012-08-21 20:03 UTC, Toshio Ernie Kuratomi
no flags Details | Diff

Description Toshio Ernie Kuratomi 2012-08-21 20:03:43 UTC
Created attachment 606036 [details]
Patch to add sphinx admonition labels instead of overriding visit_admonition()

Description of problem:
In the new docutils version (0.10 -- we're currently shipping a snapshot) there's a change to the manpage writer.  Part of that 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, they do 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.
* Instead of overriding visit_admonition(), add the additional labels to the data structure that docutils.writers.manpage will use.

I'll attach a patch to do the latter that I am also sending upstream.

We'll need to apply this in F18 and F19.  Note: At this time python-docutils is not able to rebuild for python3-3.3 so we're not able to build anything that depends on it (including pyhton-sphinx).  We have to wait on resoultion to that before we can push this fix out.

Comment 2 Luke Macken 2012-08-21 20:57:32 UTC
I tested the patch locally and it fixes the issue that I'm seeing the with building pyrasite's docs on F18 and newer.

Comment 3 Fedora Update System 2012-08-25 15:03:26 UTC
python-sphinx-1.1.3-5.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/python-sphinx-1.1.3-5.fc18

Comment 4 Fedora Update System 2012-08-25 18:20:04 UTC
Package python-sphinx-1.1.3-5.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-sphinx-1.1.3-5.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-12707/python-sphinx-1.1.3-5.fc18
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2012-09-17 22:25:37 UTC
python-sphinx-1.1.3-5.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.