Hello community,

here is the log from the commit of package python-jsonschema for 
openSUSE:Factory checked in at 2020-03-27 00:21:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jsonschema (Old)
 and      /work/SRC/openSUSE:Factory/.python-jsonschema.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-jsonschema"

Fri Mar 27 00:21:05 2020 rev:24 rq:784158 version:3.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-jsonschema/python-jsonschema.changes      
2019-11-25 11:23:32.958113831 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-jsonschema.new.3160/python-jsonschema.changes
    2020-03-27 00:21:06.292129381 +0100
@@ -1,0 +2,6 @@
+Thu Mar 12 07:44:16 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Add patch to fix build with new webcolors:
+  * webcolors.patch
+
+-------------------------------------------------------------------

New:
----
  webcolors.patch

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

Other differences:
------------------
++++++ python-jsonschema.spec ++++++
--- /var/tmp/diff_new_pack.xUe0EJ/_old  2020-03-27 00:21:07.196129839 +0100
+++ /var/tmp/diff_new_pack.xUe0EJ/_new  2020-03-27 00:21:07.200129841 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-jsonschema
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,14 +19,13 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %bcond_without python2
 Name:           python-jsonschema
-# v3 incompatibility with OpenStack raised upstream at
-# https://github.com/Julian/jsonschema/issues/604
 Version:        3.2.0
 Release:        0
 Summary:        An implementation of JSON-Schema validation for Python
 License:        MIT
 URL:            https://github.com/Julian/jsonschema
 Source:         
https://files.pythonhosted.org/packages/source/j/jsonschema/jsonschema-%{version}.tar.gz
+Patch0:         webcolors.patch
 BuildRequires:  %{python_module Twisted}
 BuildRequires:  %{python_module attrs >= 17.4.0}
 BuildRequires:  %{python_module idna}
@@ -63,6 +62,7 @@
 
 %prep
 %setup -q -n jsonschema-%{version}
+%patch0 -p1
 
 %build
 %python_build

++++++ webcolors.patch ++++++
>From 0d192e192526252c30c16b3651c293bb5f21a99f Mon Sep 17 00:00:00 2001
From: Julian Berman <[email protected]>
Date: Fri, 21 Feb 2020 09:56:13 -0500
Subject: [PATCH] Sigh... but also drops Py2 compat.

---
 jsonschema/_format.py | 11 ++++++++---
 setup.cfg             |  4 ++--
 2 files changed, 10 insertions(+), 5 deletions(-)

Index: jsonschema-3.2.0/jsonschema/_format.py
===================================================================
--- jsonschema-3.2.0.orig/jsonschema/_format.py
+++ jsonschema-3.2.0/jsonschema/_format.py
@@ -342,10 +342,15 @@ def is_draft3_time(instance):
     return datetime.datetime.strptime(instance, "%H:%M:%S")
 
 
-try:
+try:  # webcolors>=1.11
+    from webcolors import CSS21_NAMES_TO_HEX
     import webcolors
 except ImportError:
-    pass
+    try:  # webcolors<1.11
+        from webcolors import css21_names_to_hex as CSS21_NAMES_TO_HEX
+        import webcolors
+    except ImportError:
+        pass
 else:
     def is_css_color_code(instance):
         return webcolors.normalize_hex(instance)
@@ -354,7 +359,7 @@ else:
     def is_css21_color(instance):
         if (
             not isinstance(instance, str_types) or
-            instance.lower() in webcolors.css21_names_to_hex
+            instance.lower() in CSS21_NAMES_TO_HEX
         ):
             return True
         return is_css_color_code(instance)

Reply via email to