-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #3212: HTML Builders crashes with docutils-0.13 #3217
Conversation
@@ -15,8 +15,8 @@ env: | |||
- PYTHONFAULTHANDLER=x | |||
- PYTHONWARNINGS=all | |||
matrix: | |||
- DOCUTILS=0.11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this PR, I removed docutils-0.11 from test matrix to prevent to increase test time.
@shimizukawa what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's OK to me.
IMO, it is sufficient to keep only the last two versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -532,6 +533,16 @@ def visit_image(self, node): | |||
node['height'] = str(size[1]) | |||
BaseTranslator.visit_image(self, node) | |||
|
|||
# overwritten | |||
def depart_image(self, node): | |||
if docutils.__version__ >= "0.13": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comparison doesn't always work:
>>> '0.9' >= '0.13'
True
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I post a new PR for this: #3225.
Fix version comparison (refs: #3217)
BTW: add pylint *disables* for handled *deprecation* warnings Bugfixes: - Sphinx <= 1.4 (bug in docutils >= 0.13) : HTML Builders crashes with docutils-0.13 `[ref] <https://github.com/sphinx-doc/sphinx/pull/3217>`__ Downward compatibility: - Sphinx >= 1.6: ``Sphinx.warn()``, ``Sphinx.info()`` and other logging methods are now deprecated. Please use ``sphinx.util.logging`` instead. It will be removed in Sphinx-2.0. - Sphinx >= 1.7: ``sphinx.ext.autodoc.AutodocReporter`` is replaced by ``sphinx.util.docutils. switch_source_input()`` and now deprecated. It will be removed in Sphinx-2.0. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
refs #3212.