Hello community,

here is the log from the commit of package python-Sphinx for openSUSE:Leap:15.2 
checked in at 2020-03-01 08:50:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-Sphinx (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-Sphinx.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Sphinx"

Sun Mar  1 08:50:42 2020 rev:24 rq:766262 version:1.7.6

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-Sphinx/python-Sphinx.changes    
2020-01-15 15:46:23.723355987 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python-Sphinx.new.26092/python-Sphinx.changes 
2020-03-01 08:50:43.449195702 +0100
@@ -1,0 +2,7 @@
+Thu Dec  5 08:31:54 UTC 2019 - Fabian Vogt <[email protected]>
+
+- Add patch to produce output compatible with current Qt
+  (bsc#1157793, boo#1158158):
+  * fix-keyword-escaping.patch
+
+-------------------------------------------------------------------

New:
----
  fix-keyword-escaping.patch

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

Other differences:
------------------
++++++ python-Sphinx.spec ++++++
--- /var/tmp/diff_new_pack.SBH5Wd/_old  2020-03-01 08:50:44.001196800 +0100
+++ /var/tmp/diff_new_pack.SBH5Wd/_new  2020-03-01 08:50:44.005196808 +0100
@@ -32,6 +32,8 @@
 URL:            http://sphinx-doc.org
 Source:         
https://files.pythonhosted.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz
 Patch1:         disable-test.patch
+# PATCH-FIX-UPSTREAM 
(https://github.com/sphinx-doc/sphinxcontrib-qthelp/commit/6233326c914145ff0334d680b7e11e37afb12ec1)
+Patch2:         fix-keyword-escaping.patch
 BuildRequires:  %{python_module base}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
@@ -164,8 +166,7 @@
 This package contains the LaTeX components for %{name}.
 
 %prep
-%setup -q -n Sphinx-%{version}
-%patch1 -p1
+%autosetup -p1 -n Sphinx-%{version}
 
 sed -i 's/\r$//' sphinx/themes/basic/static/jquery.js # Fix wrong end-of-line 
encoding
 

++++++ fix-keyword-escaping.patch ++++++
>From 866157b51443d59aaaff0efcce70bef82a448dad Mon Sep 17 00:00:00 2001
From: Takeshi KOMIYA <[email protected]>
Date: Sun, 24 Feb 2019 18:25:51 +0900
Subject: [PATCH 1/2] Fix #6097: the keyword IDs are not escaped qthelp in .qhp
 file

Backported to Sphinx 1.7.6 by [email protected]
---

Index: Sphinx-1.7.6/tests/roots/test-need-escaped/index.rst
===================================================================
--- Sphinx-1.7.6.orig/tests/roots/test-need-escaped/index.rst
+++ Sphinx-1.7.6/tests/roots/test-need-escaped/index.rst
@@ -21,6 +21,12 @@ Contents:
 
 .. index::
    pair: "subsection"; <subsection>
+   single: & (ampersand)
+   single: < (less)
+   single: > (greater)
+   single: Sphinx (document generator)
+   single: keyword1 (class in ID)
+   single: keyword2 (foo bar baz)
 
 ----------
 subsection
Index: Sphinx-1.7.6/sphinx/builders/qthelp.py
===================================================================
--- Sphinx-1.7.6.orig/sphinx/builders/qthelp.py
+++ Sphinx-1.7.6/sphinx/builders/qthelp.py
@@ -9,6 +9,7 @@
     :license: BSD, see LICENSE for details.
 """
 
+import html
 import codecs
 import os
 import posixpath
@@ -220,7 +221,7 @@ class QtHelpBuilder(StandaloneHTMLBuilde
             # descr = groupdict.get('descr')
             if shortname.endswith('()'):
                 shortname = shortname[:-2]
-            id = '%s.%s' % (id, shortname)
+            id = html.escape('%s.%s' % (id, shortname), True)
         else:
             id = None
 
Index: Sphinx-1.7.6/tests/test_build_qthelp.py
===================================================================
--- Sphinx-1.7.6.orig/tests/test_build_qthelp.py
+++ Sphinx-1.7.6/tests/test_build_qthelp.py
@@ -66,10 +66,26 @@ def test_qthelp_escaped(app, status, war
     assert toc[0][3].attrib == {'title': 'baz', 'ref': 'baz.html'}
 
     keywords = et.find('.//keywords')
-    assert len(keywords) == 2
-    assert keywords[0].attrib == {'name': '<subsection>', 'ref': 
'index.html#index-0'}
-    assert keywords[1].attrib == {'name': '"subsection"', 'ref': 
'index.html#index-0'}
-
+    assert len(keywords) == 8
+    assert keywords[1].attrib == {'name': '& (ampersand)',
+                                  'id': 'ampersand.&',
+                                  'ref': 'index.html#index-0'}
+    assert keywords[2].attrib == {'name': '< (less)',
+                                  'id': 'less.<',
+                                  'ref': 'index.html#index-0'}
+    assert keywords[3].attrib == {'name': '"subsection"',
+                                  'ref': 'index.html#index-0'}
+    assert keywords[4].attrib == {'name': '> (greater)',
+                                  'id': 'greater.>',
+                                  'ref': 'index.html#index-0'}
+    assert keywords[5].attrib == {'name': 'keyword1 (class in ID)',
+                                  'id': 'ID.keyword1',
+                                  'ref': 'index.html#index-0'}
+    assert keywords[6].attrib == {'name': 'keyword2 (foo bar baz)',
+                                  'ref': 'index.html#index-0'}
+    assert keywords[7].attrib == {'name': 'Sphinx (document generator)',
+                                  'id': 'document.Sphinx',
+                                  'ref': 'index.html#index-0'}
 
 @pytest.mark.sphinx('qthelp', testroot='basic')
 def test_qthelp_namespace(app, status, warning):

Reply via email to