Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-Pygments for openSUSE:Factory 
checked in at 2023-11-06 21:13:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Pygments (Old)
 and      /work/SRC/openSUSE:Factory/.python-Pygments.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Pygments"

Mon Nov  6 21:13:42 2023 rev:44 rq:1123390 version:2.16.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Pygments/python-Pygments.changes  
2023-09-07 21:13:23.434698539 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-Pygments.new.17445/python-Pygments.changes   
    2023-11-06 21:13:46.334146882 +0100
@@ -1,0 +2,7 @@
+Sun Nov  5 07:15:50 UTC 2023 - Matěj Cepl <mc...@cepl.eu>
+
+- Add skip-wcag-contrast-ratio.patch to make
+  python-wcag-contrast-ratio just optional dependency
+  (gh#pygments/pygments!2564).
+
+-------------------------------------------------------------------

New:
----
  skip-wcag-contrast-ratio.patch

BETA DEBUG BEGIN:
  New:
- Add skip-wcag-contrast-ratio.patch to make
  python-wcag-contrast-ratio just optional dependency
BETA DEBUG END:

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

Other differences:
------------------
++++++ python-Pygments.spec ++++++
--- /var/tmp/diff_new_pack.4TK2fM/_old  2023-11-06 21:13:48.098211817 +0100
+++ /var/tmp/diff_new_pack.4TK2fM/_new  2023-11-06 21:13:48.098211817 +0100
@@ -32,18 +32,18 @@
 Group:          Development/Languages/Python
 URL:            https://pygments.org
 Source:         
https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM skip-wcag-contrast-ratio.patch gh#pygments/pygments!2564 
mc...@suse.com
+# Don't make wcag-contrast-ratio mandatory for testing
+Patch0:         skip-wcag-contrast-ratio.patch
 BuildRequires:  %{python_module base >= 3.7}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest >= 7}
 BuildRequires:  %{python_module setuptools >= 61}
-BuildRequires:  %{python_module wcag-contrast-ratio}
 BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros >= 20210929
 # Preferred for plugin loading, see https://pygments.org/docs/plugins/
-%if 0%{?python_version_nodots} < 38
-Requires:       python-importlib-metadata
-%endif
+Requires:       (python-importlib-metadata if python-base < 3.8)
 %if %{with libalternatives}
 Requires:       alts
 BuildRequires:  alts
@@ -84,7 +84,6 @@
 }
 
 %check
-# skip test that requires wcag-contrast-ratio Python package
 %pytest
 
 %pre

++++++ skip-wcag-contrast-ratio.patch ++++++
---
 tests/contrast/test_contrasts.py |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- a/tests/contrast/test_contrasts.py
+++ b/tests/contrast/test_contrasts.py
@@ -14,7 +14,11 @@ import os
 
 import pygments.styles
 import pygments.token
-import wcag_contrast_ratio
+try:
+    import wcag_contrast_ratio
+except ImportError:
+    wcag_contrast_ratio = None
+import unittest
 
 JSON_FILENAME = os.path.join(os.path.dirname(__file__), "min_contrasts.json")
 WCAG_AA_CONTRAST = 4.5
@@ -67,6 +71,8 @@ def update_json():
         )
 
 
+@unittest.skipIf(wcag_contrast_ratio is None,
+                 "wcag-contrast-ratio has not been installed")
 def test_contrasts(fail_if_improved=True):
     with open(JSON_FILENAME, encoding="utf-8") as f:
         previous_contrasts = json.load(f)

Reply via email to