From 4546c8a1b127583b756a49934b4f973a2b8274ba Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 8 Apr 2018 22:32:35 +0900 Subject: [PATCH 1/2] Fix #4817: wrong URLs on warning messages --- CHANGES | 1 + sphinx/writers/html.py | 2 +- sphinx/writers/html5.py | 2 +- sphinx/writers/latex.py | 2 +- sphinx/writers/manpage.py | 2 +- sphinx/writers/texinfo.py | 2 +- sphinx/writers/text.py | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index a15b43409..ae64f891b 100644 --- a/CHANGES +++ b/CHANGES @@ -20,6 +20,7 @@ Bugs fixed * #4790: autosummary: too wide two column tables in PDF builds * #4795: Latex customization via ``_templates/longtable.tex_t`` is broken * #4789: imgconverter: confused by convert.exe of Windows +* #4817: wrong URLs on warning messages Testing -------- diff --git a/sphinx/writers/html.py b/sphinx/writers/html.py index 0fc4a7bea..2aef7833e 100644 --- a/sphinx/writers/html.py +++ b/sphinx/writers/html.py @@ -873,7 +873,7 @@ class HTMLTranslator(BaseTranslator): # type: (nodes.Node, unicode) -> None logger.warning('using "math" markup without a Sphinx math extension ' 'active, please use one of the math extensions ' - 'described at http://sphinx-doc.org/ext/math.html', + 'described at http://sphinx-doc.org/en/master/ext/math.html', location=(self.builder.current_docname, node.line)) raise nodes.SkipNode diff --git a/sphinx/writers/html5.py b/sphinx/writers/html5.py index 21d7626ef..fcf1e8875 100644 --- a/sphinx/writers/html5.py +++ b/sphinx/writers/html5.py @@ -827,7 +827,7 @@ class HTML5Translator(BaseTranslator): # type: (nodes.Node, unicode) -> None logger.warning('using "math" markup without a Sphinx math extension ' 'active, please use one of the math extensions ' - 'described at http://sphinx-doc.org/ext/math.html', + 'described at http://sphinx-doc.org/en/master/ext/math.html', location=(self.builder.current_docname, node.line)) raise nodes.SkipNode diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 472107db3..0fecd7b8a 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -2630,7 +2630,7 @@ class LaTeXTranslator(nodes.NodeVisitor): # type: (nodes.Node) -> None logger.warning('using "math" markup without a Sphinx math extension ' 'active, please use one of the math extensions ' - 'described at http://sphinx-doc.org/ext/math.html', + 'described at http://sphinx-doc.org/en/master/ext/math.html', location=(self.curfilestack[-1], node.line)) raise nodes.SkipNode diff --git a/sphinx/writers/manpage.py b/sphinx/writers/manpage.py index 38954ca81..3f58fc31d 100644 --- a/sphinx/writers/manpage.py +++ b/sphinx/writers/manpage.py @@ -515,7 +515,7 @@ class ManualPageTranslator(BaseTranslator): # type: (nodes.Node) -> None logger.warning('using "math" markup without a Sphinx math extension ' 'active, please use one of the math extensions ' - 'described at http://sphinx-doc.org/ext/math.html') + 'described at http://sphinx-doc.org/en/master/ext/math.html') raise nodes.SkipNode visit_math_block = visit_math diff --git a/sphinx/writers/texinfo.py b/sphinx/writers/texinfo.py index cce269479..051ce9de6 100644 --- a/sphinx/writers/texinfo.py +++ b/sphinx/writers/texinfo.py @@ -1745,7 +1745,7 @@ class TexinfoTranslator(nodes.NodeVisitor): # type: (nodes.Node) -> None logger.warning('using "math" markup without a Sphinx math extension ' 'active, please use one of the math extensions ' - 'described at http://sphinx-doc.org/ext/math.html') + 'described at http://sphinx-doc.org/en/master/ext/math.html') raise nodes.SkipNode visit_math_block = visit_math diff --git a/sphinx/writers/text.py b/sphinx/writers/text.py index 5e870efa2..d6a72ad58 100644 --- a/sphinx/writers/text.py +++ b/sphinx/writers/text.py @@ -1185,7 +1185,7 @@ class TextTranslator(nodes.NodeVisitor): # type: (nodes.Node) -> None logger.warning('using "math" markup without a Sphinx math extension ' 'active, please use one of the math extensions ' - 'described at http://sphinx-doc.org/ext/math.html', + 'described at http://sphinx-doc.org/en/master/ext/math.html', location=(self.builder.current_docname, node.line)) raise nodes.SkipNode From b4ccaa4c0b3c68a22f0939210d84c232fecd7f85 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 8 Apr 2018 22:37:24 +0900 Subject: [PATCH 2/2] Update comments on conf.py --- sphinx/templates/quickstart/conf.py_t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/templates/quickstart/conf.py_t b/sphinx/templates/quickstart/conf.py_t index 2f3f71b1e..6a648f39c 100644 --- a/sphinx/templates/quickstart/conf.py_t +++ b/sphinx/templates/quickstart/conf.py_t @@ -4,7 +4,7 @@ # # This file does only contain a selection of the most common options. For a # full list see the documentation: -# http://www.sphinx-doc.org/en/stable/config +# http://www.sphinx-doc.org/en/master/config # -- Path setup --------------------------------------------------------------