diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-10-15 00:33:19 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-10-17 02:05:07 +0900 |
commit | 257394a4592b4b4f317059fec9938877301c2893 (patch) | |
tree | 9dc85b7486b59668ba8a64984c6aa70aadc2f1ed /sphinx/addnodes.py | |
parent | c584b71b128e2ddc0fa1d7f76bbe68217cc64c50 (diff) | |
download | sphinx-git-257394a4592b4b4f317059fec9938877301c2893.tar.gz |
Fix #5471: Show appropriate warning for deprecated APIs
Diffstat (limited to 'sphinx/addnodes.py')
-rw-r--r-- | sphinx/addnodes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/addnodes.py b/sphinx/addnodes.py index 331fe5225..8ced71d09 100644 --- a/sphinx/addnodes.py +++ b/sphinx/addnodes.py @@ -205,7 +205,7 @@ class math(nodes.math): if key == 'latex' and 'latex' not in self.attributes: warnings.warn("math node for Sphinx was replaced by docutils'. " "Therefore please use ``node.astext()`` to get an equation instead.", - RemovedInSphinx30Warning) + RemovedInSphinx30Warning, stacklevel=2) return self.astext() else: return nodes.math.__getitem__(self, key) @@ -224,7 +224,7 @@ class math_block(nodes.math_block): if key == 'latex' and 'latex' not in self.attributes: warnings.warn("displaymath node for Sphinx was replaced by docutils'. " "Therefore please use ``node.astext()`` to get an equation instead.", - RemovedInSphinx30Warning) + RemovedInSphinx30Warning, stacklevel=2) return self.astext() else: return nodes.math_block.__getitem__(self, key) |