Hello community,

here is the log from the commit of package python-Sphinx for openSUSE:Factory 
checked in at 2016-02-22 08:56:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Sphinx (Old)
 and      /work/SRC/openSUSE:Factory/.python-Sphinx.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Sphinx"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Sphinx/python-Sphinx.changes      
2016-01-30 11:31:05.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-Sphinx.new/python-Sphinx.changes 
2016-02-22 08:56:49.000000000 +0100
@@ -1,0 +2,9 @@
+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 python-Pygments 2.1.1.
+  Should be in next release.
+  See 
https://github.com/sphinx-doc/sphinx/commit/50f4862b069d58ade556aad90bd179206f10fdc1
+- Add additional latex requirements.
+
+-------------------------------------------------------------------

New:
----
  fix_some_testcase_error_with_pygments-2.1.1.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-Sphinx.spec ++++++
--- /var/tmp/diff_new_pack.rtBCyS/_old  2016-02-22 08:56:50.000000000 +0100
+++ /var/tmp/diff_new_pack.rtBCyS/_new  2016-02-22 08:56:50.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 python-Pygments 2.1.1
+# See 
https://github.com/sphinx-doc/sphinx/commit/50f4862b069d58ade556aad90bd179206f10fdc1
+Patch0:         fix_some_testcase_error_with_pygments-2.1.1.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  python-devel
 BuildRequires:  python-setuptools
@@ -99,26 +102,24 @@
 Requires:       texlive-latex
 Requires:       texlive-metafont
 Requires:       texlive-pdftex
-Requires:       tex(article.cls)
-Requires:       tex(pdftex.def)
-Requires:       tex(utf8.def)
-Requires:       tex(utf8x.def)
 Requires:       tex(8r.enc)
-Requires:       tex(english.ldf)
-Requires:       tex(pdftex.map)
 Requires:       tex(alltt.sty)
 Requires:       tex(amsfonts.sty)
 Requires:       tex(amsmath.sty)
 Requires:       tex(amssymb.sty)
 Requires:       tex(amsthm.sty)
 Requires:       tex(array.sty)
+Requires:       tex(article.cls)
 Requires:       tex(atbegshi.sty)
 Requires:       tex(babel.sty)
 Requires:       tex(bm.sty)
+Requires:       tex(capt-of.sty)
 Requires:       tex(cmap.sty)
 Requires:       tex(color.sty)
 Requires:       tex(colortbl.sty)
 Requires:       tex(dvipdfmx.def)
+Requires:       tex(english.ldf)
+Requires:       tex(eqparbox.sty)
 Requires:       tex(fancybox.sty)
 Requires:       tex(fancyhdr.sty)
 Requires:       tex(fancyvrb.sty)
@@ -136,21 +137,27 @@
 Requires:       tex(longtable.sty)
 Requires:       tex(makeidx.sty)
 Requires:       tex(multirow.sty)
+Requires:       tex(needspace.sty)
+Requires:       tex(newfloat.sty)
 Requires:       tex(palatino.sty)
 Requires:       tex(parskip.sty)
+Requires:       tex(pcrr.tfm)
+Requires:       tex(pdftex.def)
+Requires:       tex(pdftex.map)
+Requires:       tex(phvr.tfm)
+Requires:       tex(pplr.tfm)
 Requires:       tex(preview.sty)
+Requires:       tex(ptmr.tfm)
+Requires:       tex(pzcmi.tfm)
 Requires:       tex(tabulary.sty)
 Requires:       tex(textcomp.sty)
 Requires:       tex(threeparttable.sty)
 Requires:       tex(times.sty)
 Requires:       tex(titlesec.sty)
 Requires:       tex(upquote.sty)
+Requires:       tex(utf8.def)
+Requires:       tex(utf8x.def)
 Requires:       tex(wrapfig.sty)
-Requires:       tex(pcrr.tfm)
-Requires:       tex(phvr.tfm)
-Requires:       tex(pplr.tfm)
-Requires:       tex(ptmr.tfm)
-Requires:       tex(pzcmi.tfm)
 
 %description    latex
 Sphinx is a tool that makes it easy to create intelligent and beautiful
@@ -168,6 +175,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 '

Reply via email to