Fix #3865: use of self.env.warn in sphinx extension fails

This commit is contained in:
Takeshi KOMIYA 2017-06-17 01:44:32 +09:00
parent d06cb0bc2e
commit 9a9a3c6796
2 changed files with 2 additions and 2 deletions

View File

@ -25,6 +25,7 @@ Bugs fixed
* #3835: sphinx.ext.imgmath fails to convert SVG images if project directory * #3835: sphinx.ext.imgmath fails to convert SVG images if project directory
name contains spaces name contains spaces
* #3850: Fix color handling in make mode's help command * #3850: Fix color handling in make mode's help command
* #3865: use of self.env.warn in sphinx extension fails
Testing Testing
-------- --------

View File

@ -300,8 +300,7 @@ class BuildEnvironment(object):
be emitted instantly, but collected for emitting all warnings after be emitted instantly, but collected for emitting all warnings after
the update of the environment. the update of the environment.
""" """
# strange argument order is due to backwards compatibility self.app.warn(msg, location=(docname, lineno), **kwargs)
self._warnfunc(msg, (docname, lineno), **kwargs)
def warn_node(self, msg, node, **kwargs): def warn_node(self, msg, node, **kwargs):
# type: (unicode, nodes.Node, Any) -> None # type: (unicode, nodes.Node, Any) -> None