Skip to content
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

dev-python/sphinx: Backport fixes for compatibility with docutils 0.13 #452

Merged
merged 1 commit into from
Jan 24, 2017

Conversation

gagern
Copy link
Contributor

@gagern gagern commented Jan 24, 2017

Fixes #451.

I decided not to restrict the version in the dependency, but instead to backport the required modifications. Doing so will avoid contributing to the already long list of packages version-pinned due to some Sage requirement. The first chunk of the patch is probably mostly cosmetic, and not strictly necessary. Let me know if you'd like me to remove that chunk.

See file history of html.py for the commits mentioned in the header of the patch.


+ # overwritten
+ def depart_image(self, node):
+ if node['uri'].lower().endswith(('svg', 'svgz')):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You depart from upstream fix by not checking for the docutils version. Is this safe to use with docutils-0.12 which is in stable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream reverted that version check in sphinx-doc/sphinx@b98e2e3. The important aspect is to keep things balanced: if visit_image does call the base version without modifying the stack itself, then so does depart_image. If visit_image returns without calling the base version, and does push something on the stack, then depart_image doesn't call the base version either, and makes use of the item on the stack. The common check for file extension achieves that these code paths will always match one another.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I hadn't inspected that commit. So long as it doesn't lock use in docutils-0.13 over 0.12 I see no reason not to merge.

@kiwifb kiwifb merged commit e2aeaf7 into cschwan:master Jan 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants