diff options
author | Robin Gloster <mail@glob.in> | 2016-01-21 05:30:02 +0100 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-01-21 05:30:02 +0100 |
commit | abdd8a81eb650a3d277e76b0f578d162bc819547 (patch) | |
tree | 8ef0ea8b5e4849f1c69027b814a0012b957fc8d3 /pkgs/development | |
parent | 39a07cabe870fb64e972981d961a5a4b9ddbdaca (diff) | |
parent | d561179789d19676887f7dec6984b3d0a13cd941 (diff) | |
download | nixpkgs-abdd8a81eb650a3d277e76b0f578d162bc819547.tar nixpkgs-abdd8a81eb650a3d277e76b0f578d162bc819547.tar.gz nixpkgs-abdd8a81eb650a3d277e76b0f578d162bc819547.tar.bz2 nixpkgs-abdd8a81eb650a3d277e76b0f578d162bc819547.tar.lz nixpkgs-abdd8a81eb650a3d277e76b0f578d162bc819547.tar.xz nixpkgs-abdd8a81eb650a3d277e76b0f578d162bc819547.tar.zst nixpkgs-abdd8a81eb650a3d277e76b0f578d162bc819547.zip |
Merge pull request #12513 from nckx/master
Update & fix Sphinx [PR for Travis testing]
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/python-modules/sphinx-1.3.1-pr-1946.patch | 35 | ||||
-rw-r--r-- | pkgs/development/python-modules/sphinx-fix-tests-with-pygments-2.1.patch | 63 |
2 files changed, 63 insertions, 35 deletions
diff --git a/pkgs/development/python-modules/sphinx-1.3.1-pr-1946.patch b/pkgs/development/python-modules/sphinx-1.3.1-pr-1946.patch deleted file mode 100644 index 2933040141a..00000000000 --- a/pkgs/development/python-modules/sphinx-1.3.1-pr-1946.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 7ce3b991229c74262f81ab7692a1dc6bde2416ee Mon Sep 17 00:00:00 2001 -From: Barry Warsaw <barry@python.org> -Date: Thu, 25 Jun 2015 11:54:05 -0400 -Subject: [PATCH] One way to work around the lack of - html.parser.HTMLParserError in Python 3.5 - ---- - sphinx/builders/linkcheck.py | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py -index 9f5c213..b05c5b2 100644 ---- a/sphinx/builders/linkcheck.py -+++ b/sphinx/builders/linkcheck.py -@@ -19,9 +19,19 @@ - from six.moves.urllib.request import build_opener, Request, HTTPRedirectHandler - from six.moves.urllib.parse import unquote, urlsplit, quote - from six.moves.urllib.error import HTTPError --from six.moves.html_parser import HTMLParser, HTMLParseError -+from six.moves.html_parser import HTMLParser - from docutils import nodes - -+# 2015-06-25 barry@python.org. This exception was deprecated in Python 3.3 and -+# removed in Python 3.5, however for backward compatibility reasons, we're not -+# going to just remove it. If it doesn't exist, define an exception that will -+# never be caught but leaves the code in check_anchor() intact. -+try: -+ from six.moves.html_parser import HTMLParseError -+except ImportError: -+ class HTMLParseError(Exception): -+ pass -+ - from sphinx.builders import Builder - from sphinx.util.console import purple, red, darkgreen, darkgray, \ - darkred, turquoise diff --git a/pkgs/development/python-modules/sphinx-fix-tests-with-pygments-2.1.patch b/pkgs/development/python-modules/sphinx-fix-tests-with-pygments-2.1.patch new file mode 100644 index 00000000000..5aa4af873cd --- /dev/null +++ b/pkgs/development/python-modules/sphinx-fix-tests-with-pygments-2.1.patch @@ -0,0 +1,63 @@ +From 5574aba60ed76f2bae947722122ac4d71ab8ed5a Mon Sep 17 00:00:00 2001 +From: Takeshi KOMIYA <i.tkomiya@gmail.com> +Date: Mon, 18 Jan 2016 12:38:02 +0900 +Subject: [PATCH] Fix tests are broken with pygments-2.1 + +--- + tests/test_build_html.py | 2 +- + tests/test_intl.py | 10 ++++++---- + 2 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/tests/test_build_html.py b/tests/test_build_html.py +index e330761..17ea089 100644 +--- a/tests/test_build_html.py ++++ b/tests/test_build_html.py +@@ -82,7 +82,7 @@ def checker(nodes): + (".//a[@href='_downloads/img1.png']", ''), + (".//pre", u'"quotes"'), + (".//pre", u"'included'"), +- (".//pre/span[@class='s']", u'üöä'), ++ (".//pre/span[@class='s2']", u'üöä'), + (".//div[@class='inc-pyobj1 highlight-text']//pre", + r'^class Foo:\n pass\n\s*$'), + (".//div[@class='inc-pyobj2 highlight-text']//pre", +diff --git a/tests/test_intl.py b/tests/test_intl.py +index 4c665d4..b24ec65 100644 +--- a/tests/test_intl.py ++++ b/tests/test_intl.py +@@ -694,14 +694,15 @@ def test_additional_targets_should_not_be_translated(app, status, warning): + yield assert_count(expected_expr, result, 1) + + # C code block with lang should not be translated but be *C* highlighted +- expected_expr = """<span class="cp">#include <stdio.h></span>""" ++ expected_expr = ("""<span class="cp">#include</span> """ ++ """<span class="cpf"><stdio.h></span>""") + yield assert_count(expected_expr, result, 1) + + # doctest block should not be translated but be highlighted + expected_expr = ( + """<span class="gp">>>> </span>""" + """<span class="kn">import</span> <span class="nn">sys</span> """ +- """<span class="c"># sys importing</span>""") ++ """<span class="c1"># sys importing</span>""") + yield assert_count(expected_expr, result, 1) + + ## raw.txt +@@ -754,14 +755,15 @@ def test_additional_targets_should_be_translated(app, status, warning): + yield assert_count(expected_expr, result, 1) + + # C code block with lang should be translated and be *C* highlighted +- expected_expr = """<span class="cp">#include <STDIO.H></span>""" ++ expected_expr = ("""<span class="cp">#include</span> """ ++ """<span class="cpf"><STDIO.H></span>""") + yield assert_count(expected_expr, result, 1) + + # doctest block should not be translated but be highlighted + expected_expr = ( + """<span class="gp">>>> </span>""" + """<span class="kn">import</span> <span class="nn">sys</span> """ +- """<span class="c"># SYS IMPORTING</span>""") ++ """<span class="c1"># SYS IMPORTING</span>""") + yield assert_count(expected_expr, result, 1) + + ## raw.txt |