Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-Sphinx for openSUSE:Factory 
checked in at 2026-08-21 16:50:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Sphinx (Old)
 and      /work/SRC/openSUSE:Factory/.python-Sphinx.new.1258 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Sphinx"

Fri Aug 21 16:50:02 2026 rev:115 rq:1372561 version:9.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Sphinx/python-Sphinx.changes      
2026-08-01 18:28:17.201659362 +0200
+++ /work/SRC/openSUSE:Factory/.python-Sphinx.new.1258/python-Sphinx.changes    
2026-08-21 16:50:35.418126957 +0200
@@ -1,0 +2,5 @@
+Thu Aug 20 14:45:10 UTC 2026 - Nico Krapp <[email protected]>
+
+- Apply tests.patch to fix tests with Pygments 2.21.0
+
+-------------------------------------------------------------------

New:
----
  tests.patch

----------(New B)----------
  New:
- Apply tests.patch to fix tests with Pygments 2.21.0
----------(New E)----------

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

Other differences:
------------------
++++++ python-Sphinx.spec ++++++
--- /var/tmp/diff_new_pack.TzQp7J/_old  2026-08-21 16:50:36.808176856 +0200
+++ /var/tmp/diff_new_pack.TzQp7J/_new  2026-08-21 16:50:36.810176928 +0200
@@ -46,6 +46,8 @@
 Source4:        readthedocs.inv
 Source5:        update-intersphinx.sh
 Source99:       python-Sphinx.keyring
+# PATCH-FIX-UPSTREAM fix tests with Pygments 2.21.0 gh#sphinx-doc/sphinx#14611
+Patch0:         tests.patch
 BuildRequires:  %{python_module base >= 3.12}
 BuildRequires:  %{python_module flit-core >= 3.11}
 BuildRequires:  %{python_module pip}





++++++ tests.patch ++++++
Index: sphinx-9.1.0/tests/test_builders/test_build_html_code.py
===================================================================
--- sphinx-9.1.0.orig/tests/test_builders/test_build_html_code.py
+++ sphinx-9.1.0/tests/test_builders/test_build_html_code.py
@@ -45,6 +45,11 @@ def test_html_code_role(app: SphinxTestA
     else:
         sp = ' '
 
+    if tuple(map(int, pygments.__version__.split('.')[:2])) >= (2, 21):
+        abc = '"abc"'
+    else:
+        abc = '&quot;abc&quot;'
+
     app.build()
     content = (app.outdir / 'index.html').read_text(encoding='utf8')
 
@@ -57,7 +62,7 @@ def test_html_code_role(app: SphinxTestA
         '<span class="o">+</span> '
         '<span class="kc">None</span> '
         '<span class="o">+</span> '
-        '<span class="s2">&quot;abc&quot;</span>'
+        f'<span class="s2">{abc}</span>'
         '<span class="p">):</span> '
         '<span class="k">pass</span>'
     )
Index: sphinx-9.1.0/tests/test_extensions/test_ext_viewcode.py
===================================================================
--- sphinx-9.1.0.orig/tests/test_extensions/test_ext_viewcode.py
+++ sphinx-9.1.0/tests/test_extensions/test_ext_viewcode.py
@@ -20,6 +20,11 @@ def check_viewcode_output(app: SphinxTes
     else:
         sp = ' '
 
+    if tuple(map(int, pygments.__version__.split('.')[:2])) >= (2, 21):
+        ds = '"""this is Class1"""'
+    else:
+        ds = '&quot;&quot;&quot;this is Class1&quot;&quot;&quot;'
+
     warnings = re.sub(r'\\+', '/', app.warning.getvalue())
     assert re.findall(
         r"index.rst:\d+: WARNING: Object named 'func1' not found in include "
@@ -49,10 +54,7 @@ def check_viewcode_output(app: SphinxTes
     ) in result
     assert '<span>@decorator</span>\n' in result
     assert f'<span>class</span>{sp}<span>Class1</span><span>:</span>\n' in 
result
-    assert (
-        '<span>    </span>'
-        '<span>&quot;&quot;&quot;this is 
Class1&quot;&quot;&quot;</span></div>\n'
-    ) in result
+    assert f'<span>    </span><span>{ds}</span></div>\n' in result
 
     return result
 
Index: sphinx-9.1.0/tests/test_highlighting.py
===================================================================
--- sphinx-9.1.0.orig/tests/test_highlighting.py
+++ sphinx-9.1.0/tests/test_highlighting.py
@@ -27,6 +27,12 @@ if tuple(map(int, pygments.__version__.s
     Formatter.__class_getitem__ = classmethod(lambda cls, name: cls)  # type: 
ignore[attr-defined]
 
 
+if tuple(map(int, pygments.__version__.split('.')[:2])) < (2, 21):
+    hsw = '&quot;Hello sphinx world&quot;'
+else:
+    hsw = '"Hello sphinx world"'
+
+
 class MyLexer(RegexLexer):
     name = 'testlexer'
 
@@ -93,7 +99,7 @@ def test_default_highlight(logger: mock.
     ret = bridge.highlight_block('print "Hello sphinx world"', 'default')
     assert ret == (
         '<div class="highlight"><pre><span></span><span 
class="nb">print</span> '
-        '<span class="s2">&quot;Hello sphinx 
world&quot;</span>\n</pre></div>\n'
+        f'<span class="s2">{hsw}</span>\n</pre></div>\n'
     )
 
     # default: fallbacks to none if highlighting failed
@@ -107,7 +113,7 @@ def test_default_highlight(logger: mock.
     assert ret == (
         '<div class="highlight"><pre><span></span><span 
class="nb">print</span>'
         '<span class="p">(</span>'
-        '<span class="s2">&quot;Hello sphinx world&quot;</span>'
+        f'<span class="s2">{hsw}</span>'
         '<span class="p">)</span>\n</pre></div>\n'
     )
 
@@ -116,7 +122,7 @@ def test_default_highlight(logger: mock.
     assert ret == (
         '<div class="highlight"><pre><span></span><span 
class="nb">print</span>'
         '<span class="p">(</span>'
-        '<span class="s2">&quot;Hello sphinx world&quot;</span>'
+        f'<span class="s2">{hsw}</span>'
         '<span class="p">)</span>\n</pre></div>\n'
     )
 
Index: sphinx-9.1.0/tests/test_intl/test_intl.py
===================================================================
--- sphinx-9.1.0.orig/tests/test_intl/test_intl.py
+++ sphinx-9.1.0/tests/test_intl/test_intl.py
@@ -1638,6 +1638,11 @@ def test_additional_targets_should_not_b
     else:
         sp = ' '
 
+    if tuple(map(int, pygments.__version__.split('.')[:2])) >= (2, 21):
+        res = "'result'"
+    else:
+        res = '&#39;result&#39;'
+
     app.build()
     # [literalblock.txt]
     result = (app.outdir / 'literalblock.html').read_text(encoding='utf8')
@@ -1647,7 +1652,7 @@ def test_additional_targets_should_not_b
     assert_count(expected_expr, result, 2)
 
     # ruby code block should not be translated but be highlighted
-    expected_expr = """<span class="s1">&#39;result&#39;</span>"""
+    expected_expr = f"""<span class="s1">{res}</span>"""
     assert_count(expected_expr, result, 1)
 
     # C code block without lang should not be translated and *ruby* highlighted
@@ -1726,6 +1731,13 @@ def test_additional_targets_should_be_tr
     else:
         sp = ' '
 
+    if tuple(map(int, pygments.__version__.split('.')[:2])) >= (2, 21):
+        home = '"HTTPS://SPHINX-DOC.ORG"'
+        res = "'RESULT'"
+    else:
+        home = '&quot;HTTPS://SPHINX-DOC.ORG&quot;'
+        res = '&#39;RESULT&#39;'
+
     app.build()
     # [literalblock.txt]
     result = (app.outdir / 'literalblock.html').read_text(encoding='utf8')
@@ -1738,7 +1750,7 @@ def test_additional_targets_should_be_tr
     assert_count(expected_expr, result, 1)
 
     # literalinclude should be translated
-    expected_expr = '<span 
class="s2">&quot;HTTPS://SPHINX-DOC.ORG&quot;</span>'
+    expected_expr = f'<span class="s2">{home}</span>'
     assert_count(expected_expr, result, 1)
 
     # title should be translated
@@ -1746,7 +1758,7 @@ def test_additional_targets_should_be_tr
     assert_count(expected_expr, result, 2)
 
     # ruby code block should be translated and be highlighted
-    expected_expr = """<span class="s1">&#39;RESULT&#39;</span>"""
+    expected_expr = f"""<span class="s1">{res}</span>"""
     assert_count(expected_expr, result, 1)
 
     # C code block without lang should be translated and *ruby* highlighted

Reply via email to