Bug 1716532 - docutils.writers._html_base.SimpleListChecker: visiting unknown node type: compact_paragraph
Summary: docutils.writers._html_base.SimpleListChecker: visiting unknown node type: co...
Alias: None
Product: Fedora
Classification: Fedora
Component: python-sphinxtesters
Version: 31
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL: https://copr.fedorainfracloud.org/cop...
Depends On:
Blocks: PYTHON38 1736513 1736536 1736543
TreeView+ depends on / blocked
Reported: 2019-06-03 14:40 UTC by Miro Hrončok
Modified: 2019-08-14 09:24 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-08-13 19:51:44 UTC
Type: ---

Attachments (Terms of Use)

Description Miro Hrončok 2019-06-03 14:40:52 UTC
See https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/python-sphinxtesters/ for actual logs. This report is automated and not very verbose, but feel free to ping me for help.

Comment 1 Jerry James 2019-06-30 21:24:29 UTC
The build fails with multiple errors of this form:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/nose/suite.py", line 209, in run
  File "/usr/lib/python3.8/site-packages/nose/suite.py", line 292, in setUp
  File "/usr/lib/python3.8/site-packages/nose/suite.py", line 315, in setupContext
    try_run(context, names)
  File "/usr/lib/python3.8/site-packages/nose/util.py", line 471, in try_run
    return func()
  File "/builddir/build/BUILD/sphinxtesters-0.2.1/sphinxtesters/sphinxutils.py", line 367, in setup_class
    super(ModifiedPageBuilder, cls).setup_class()
  File "/builddir/build/BUILD/sphinxtesters-0.2.1/sphinxtesters/sphinxutils.py", line 187, in setup_class
  File "/builddir/build/BUILD/sphinxtesters-0.2.1/sphinxtesters/sphinxutils.py", line 218, in build_source
    raise RuntimeError('page build failed with build error {}'
RuntimeError: page build failed with build error <class 'docutils.writers._html_base.SimpleListChecker'> visiting unknown node type: compact_paragraph

That looks like a problem in docutils to me.  The sphinxtesters code is merely reporting that docutils threw an exception.  It seems that docutils needs to be taught about the compact_paragraph node type.  Indeed, the list of node types starting on line 1798 of /usr/lib/python3.8/site-packages/docutils/nodes.py does not include compact_paragraph.

I'm assigning this bug to python-docutils.  If you disagree that it is a docutils problem, tell me why and assign it back.

Comment 2 Miro Hrončok 2019-07-30 14:24:03 UTC
Fedora Infrastructure SIG, are you responsive?

Docutils is maintained by mstuchli and oddshocks (both gone AFAIK).

Comment 3 Jerry James 2019-07-30 14:42:23 UTC
Also, more than just python-sphinxtesters is affected by this; python-nb2plots and python-texext failed the mass rebuild in part due to docutils throwing an error about the compact_paragraph node type.

Comment 4 Kevin Fenzi 2019-08-02 02:45:10 UTC
ok, as a first stab, I am updating to 0.15.2... just built it in rawhide. Can you look and see if that solves this issue?


I don't see any obvious fixes for this, but they may have solved it some other way. 

If not, we can try and ping upstream on it.

Comment 5 Miro Hrončok 2019-08-02 09:50:30 UTC
0.15.2-1.fc31 doesn't change the failure.

Comment 6 Kevin Fenzi 2019-08-05 16:07:10 UTC
I looked at this yesterday and came up with some patches, but none of them worked quite right. 

So, I think we need to talk to upstream. Would one of you be willing to file a bug on this?

Or I will try and do so before I head out tomorrow...

Comment 7 Matthew Brett 2019-08-07 15:10:49 UTC
I'm "upstream" - this should be fixed in the latest PyPI release.

Comment 8 Jerry James 2019-08-08 02:06:18 UTC
Hi Matthew.  PyPi says the latest release is 0.15.2 which, as was noted in comment 5, does not fix the problem.  The definition of node_class_names on trunk still does not include compact_paragraph:


Comment 9 Matthew Brett 2019-08-08 09:16:31 UTC
Yes, sorry, I should have been clearer.

I'm the author of 'sphinxtesters' - the paackage that generates the error above.

The error is not a Docutils error, it was breakage from Sphinxtesters' attempt to isolate a new Sphinx application instance from the Docutils global state.

Specifically, Sphinx applications alter various bits of global state in Docutils, and among the changes, Sphinx applications insert various 'visit_' and 'depart_' methods into the Docutils "nodes.GenericNodeVisitor" class.  One of these is "visit_compact_paragraph" - where "compact_paragraph" is a node type defined by Sphinx.

Sphinxtesters has to work round this to allow multiple Sphinx applications that do not clash with each other.  It does this by caching the Docutils state, including the methods of "nodes.GenericNodeVisitor", running the Sphinx application init and processing, then restoring the cached state.

When Sphinx 2.0 was released, this hack in Sphinxtesters started to fail.  Specifically, the hack was not any longer correctly restoring the `visit_compact_paragraph` (and other Sphinx-specific visit_ / depart_ methods) to the nodes.GenericNodeVisitor class in Docutils.

I fixed this in the latest release of Sphinxtesters.

Comment 10 Matthew Brett 2019-08-08 09:18:19 UTC
Incidentally, the packages "Texext" and "nb2plots" use Sphinxtesters, which is why they were showing the same errors.

Comment 11 Miro Hrončok 2019-08-08 09:49:59 UTC
Excellent news! Thanks for figuring that one out.

Comment 12 Ben Cotton 2019-08-13 17:09:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 13 Ben Cotton 2019-08-13 17:33:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 14 Jerry James 2019-08-13 19:28:39 UTC
Got it.  Sorry for being dense.  I'll update to the new version and get everything rebuilt today.  Thanks for the fix!

Comment 15 Jerry James 2019-08-13 19:38:14 UTC
I should ask the obvious question: do you want to maintain, or comaintain, the python-sphinxtesters package in Fedora?

Comment 16 Jerry James 2019-08-13 19:51:44 UTC
New version built in Rawhide.

Comment 17 Matthew Brett 2019-08-14 09:24:01 UTC
I don't know much about Fedora packaging.

Happy to co-maintain, if that's useful to you.

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