I'm not 100% sure how this is possible, but as of the 0.15 release yesterday, docutils is broken (in my codebase) due to a circular dependency.
Minimal example:
# this works: from docutils import utils from docutils import nodes # However, this does not from docutils import nodes
This is due to a circular dependency introduced in version 0.15: docutils.nodes
is dependent on docutils.utils
which is in turn dependent on docutils.nodes
. Depending on the import order your code uses, it could explode at runtime.
Looks like this is breaking tools calling docutil too, e.g. https://bugs.launchpad.net/doc8/+bug/1837515 (fails on Python 2.7 but worked on Python 3 - possibly with some other package version differences)
fixable: by putting
import docutils.utils
into the function astextwould be release 0.15.1 then
Friend of mine pointed out to me that this seems to only break in 2.7.x, he tried in 3.6 and the import seemed to work.
Fixed in [r8294] (by moving the definition of unescape() to nodes).
Thank you for reporting.
Related
Commit: [r8294]