Hello community, here is the log from the commit of package python3-Sphinx for openSUSE:Factory checked in at 2016-02-22 08:56:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-Sphinx (Old) and /work/SRC/openSUSE:Factory/.python3-Sphinx.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-Sphinx" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-Sphinx/python3-Sphinx.changes 2016-01-28 22:50:25.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3-Sphinx.new/python3-Sphinx.changes 2016-02-22 08:56:45.000000000 +0100 @@ -1,0 +2,8 @@ +Wed Feb 17 09:10:17 UTC 2016 - toddrme2...@gmail.com + +- Add fix_some_testcase_error_with_pygments-2.1.1.patch + Fixes tests with python3-Pygments 2.1.1. + Should be in next release. + See https://github.com/sphinx-doc/sphinx/commit/50f4862b069d58ade556aad90bd179206f10fdc1 + +------------------------------------------------------------------- New: ---- fix_some_testcase_error_with_pygments-2.1.1.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-Sphinx.spec ++++++ --- /var/tmp/diff_new_pack.LdU7i1/_old 2016-02-22 08:56:46.000000000 +0100 +++ /var/tmp/diff_new_pack.LdU7i1/_new 2016-02-22 08:56:46.000000000 +0100 @@ -24,6 +24,9 @@ License: BSD-2-Clause Group: Development/Languages/Python Source: http://pypi.python.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz +# PATCH-FIX-UPSTREAM fix_some_testcase_error_with_pygments-2.1.1.patch - fix tests with python3-Pygments 2.1.1 +# See https://github.com/sphinx-doc/sphinx/commit/50f4862b069d58ade556aad90bd179206f10fdc1 +Patch0: fix_some_testcase_error_with_pygments-2.1.1.patch BuildRequires: python3-devel BuildRequires: python3-setuptools # Documentation requirements: @@ -163,6 +166,8 @@ %prep %setup -q -n Sphinx-%{version} +%patch0 -p1 + sed -i '/#\!/d' sphinx/pycode/pgen2/token.py # Fix non-excutable-script warning # Add Interpreter version suffix to entrypoints (and thus /usr/bin binaries) to # allow for update-alternatives later on: ++++++ fix_some_testcase_error_with_pygments-2.1.1.patch ++++++ >From 50f4862b069d58ade556aad90bd179206f10fdc1 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA <i.tkom...@gmail.com> Date: Mon, 15 Feb 2016 11:46:30 +0900 Subject: [PATCH] Fix some testcase get error with pygments-2.1.1 --- tests/test_build_html.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/test_build_html.py b/tests/test_build_html.py index b97d9d5..c11ad68 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -344,12 +344,23 @@ def check_xpath(etree, fname, path, check, be_found=True): # only check for node presence pass else: + def get_text(node): + if node.text is not None: + return node.text + else: + # Since pygments-2.1.1, empty <span> tag is inserted at top of + # highlighting block + if len(node) == 1 and node[0].tag == 'span' and node[0].text is None: + return node[0].tail + else: + return '' + rex = re.compile(check) if be_found: - if any(node.text and rex.search(node.text) for node in nodes): + if any(rex.search(get_text(node)) for node in nodes): return else: - if all(node.text and not rex.search(node.text) for node in nodes): + if all(not rex.search(get_text(node)) for node in nodes): return assert False, ('%r not found in any node matching '