From 46af04694a137f23172621d8150ee0f6dac6b62c Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 19 May 2018 16:05:33 +0900 Subject: [PATCH 1/2] Add warning to docstring of math nodes --- sphinx/addnodes.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sphinx/addnodes.py b/sphinx/addnodes.py index 40390f346..8e4f1ba35 100644 --- a/sphinx/addnodes.py +++ b/sphinx/addnodes.py @@ -193,6 +193,9 @@ class production(nodes.Part, nodes.Inline, nodes.FixedTextElement): class math(nodes.math): """Node for inline equations. + .. warning:: This node is provided to keep compatibility only. + It will be removed in nearly future. Don't use this from your extension. + .. deprecated:: 1.8 Use ``docutils.nodes.math`` instead. """ @@ -211,6 +214,9 @@ class math(nodes.math): class math_block(nodes.math_block): """Node for block level equations. + .. warning:: This node is provided to keep compatibility only. + It will be removed in nearly future. Don't use this from your extension. + .. deprecated:: 1.8 """ @@ -227,6 +233,9 @@ class math_block(nodes.math_block): class displaymath(math_block): """Node for block level equations. + .. warning:: This node is provided to keep compatibility only. + It will be removed in nearly future. Don't use this from your extension. + .. deprecated:: 1.8 """ From 3bfb2a5fa4dcbf9820f2fddc5bb964b71f7f1349 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 19 May 2018 16:06:18 +0900 Subject: [PATCH 2/2] Remove unused code --- sphinx/directives/patches.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/sphinx/directives/patches.py b/sphinx/directives/patches.py index f84f082bc..1c90d5313 100644 --- a/sphinx/directives/patches.py +++ b/sphinx/directives/patches.py @@ -130,8 +130,6 @@ class MathDirective(SphinxDirective): nowrap='nowrap' in self.options) ret = [node] set_source_info(self, node) - if hasattr(self, 'src'): - node.source = self.src self.add_target(ret) return ret