Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pycha for openSUSE:Factory 
checked in at 2023-04-12 12:52:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pycha (Old)
 and      /work/SRC/openSUSE:Factory/.python-pycha.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pycha"

Wed Apr 12 12:52:19 2023 rev:7 rq:1078562 version:0.8.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pycha/python-pycha.changes        
2020-05-20 18:47:49.949601802 +0200
+++ /work/SRC/openSUSE:Factory/.python-pycha.new.19717/python-pycha.changes     
2023-04-12 12:52:21.729199099 +0200
@@ -1,0 +2,8 @@
+Tue Apr 11 09:03:26 UTC 2023 - pgaj...@suse.com
+
+- do not require python-six
+- added patches
+  + python-pycha-no-six.patch
+- test the package
+
+-------------------------------------------------------------------

New:
----
  python-pycha-no-six.patch

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

Other differences:
------------------
++++++ python-pycha.spec ++++++
--- /var/tmp/diff_new_pack.0BnaWt/_old  2023-04-12 12:52:22.241202091 +0200
+++ /var/tmp/diff_new_pack.0BnaWt/_new  2023-04-12 12:52:22.245202115 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pycha
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,6 @@
 #
 
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pycha
 Version:        0.8.1
 Release:        0
@@ -25,17 +24,19 @@
 Group:          Development/Languages/Python
 URL:            https://bitbucket.org/lgs/pycha/
 Source:         
https://files.pythonhosted.org/packages/source/p/pycha/pycha-%{version}.tar.gz
+# upstream repo (bitbucket) as defined on pypi gone
+# is safe_unicode() needed at all?
+Patch0:         python-pycha-no-six.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-cairocffi
-Requires:       python-six
 Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
 BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module cairocffi}
-BuildRequires:  %{python_module six}
+BuildRequires:  %{python_module pytest}
 # /SECTION
 %python_subpackages
 
@@ -47,7 +48,7 @@
 web programming. Pycha was developed for the server side.
 
 %prep
-%setup -q -n pycha-%{version}
+%autosetup -p1 -n pycha-%{version}
 
 %build
 %python_build
@@ -63,10 +64,14 @@
 %postun
 %python_uninstall_alternative chavier
 
+%check
+%pytest tests/*.py
+
 %files %{python_files}
 %doc README.txt CHANGES.txt AUTHORS
 %license COPYING
-%{python_sitelib}/*
+%{python_sitelib}/pycha*
+%{python_sitelib}/chavier
 %python_alternative %{_bindir}/chavier
 
 %changelog

++++++ python-pycha-no-six.patch ++++++
Index: pycha-0.8.1/pycha.egg-info/requires.txt
===================================================================
--- pycha-0.8.1.orig/pycha.egg-info/requires.txt
+++ pycha-0.8.1/pycha.egg-info/requires.txt
@@ -1,4 +1,3 @@
-six
 cairocffi
 
 [testing]
Index: pycha-0.8.1/pycha/chart.py
===================================================================
--- pycha-0.8.1.orig/pycha/chart.py
+++ pycha-0.8.1/pycha/chart.py
@@ -19,7 +19,7 @@ import copy
 import math
 
 import cairocffi as cairo
-from six.moves import reduce
+from functools import reduce
 
 from pycha.color import ColorScheme, hex2rgb, DEFAULT_COLOR
 from pycha.compat import getfullargspec
Index: pycha-0.8.1/pycha/color.py
===================================================================
--- pycha-0.8.1.orig/pycha/color.py
+++ pycha-0.8.1/pycha/color.py
@@ -18,8 +18,6 @@
 
 import math
 
-import six
-
 from pycha.utils import clamp
 
 
@@ -125,14 +123,14 @@ class ColorSchemeMetaclass(type):
         return klass
 
 
-class ColorScheme(six.with_metaclass(ColorSchemeMetaclass, dict)):
+class ColorScheme(dict, metaclass=ColorSchemeMetaclass):
     """A color scheme is a dictionary where the keys match the keys
     constructor argument and the values are colors"""
 
     __registry__ = {}
 
     def __init__(self, keys):
-        super(ColorScheme, self).__init__()
+        super().__init__()
 
     @classmethod
     def registerColorScheme(cls):
@@ -154,7 +152,7 @@ class GradientColorScheme(ColorScheme):
     """
 
     def __init__(self, keys, initialColor=DEFAULT_COLOR):
-        super(GradientColorScheme, self).__init__(keys)
+        super().__init__(keys)
         if initialColor in basicColors:
             initialColor = basicColors[initialColor]
 
@@ -172,7 +170,7 @@ class FixedColorScheme(ColorScheme):
     """
 
     def __init__(self, keys, colors=[]):
-        super(FixedColorScheme, self).__init__(keys)
+        super().__init__(keys)
 
         if len(keys) != len(colors):
             raise ValueError("You must provide as many colors as datasets "
@@ -190,7 +188,7 @@ class RainbowColorScheme(ColorScheme):
     """
 
     def __init__(self, keys, initialColor=DEFAULT_COLOR):
-        super(RainbowColorScheme, self).__init__(keys)
+        super().__init__(keys)
         if initialColor in basicColors:
             initialColor = basicColors[initialColor]
 
Index: pycha-0.8.1/pycha/stackedbar.py
===================================================================
--- pycha-0.8.1.orig/pycha/stackedbar.py
+++ pycha-0.8.1/pycha/stackedbar.py
@@ -16,7 +16,7 @@
 # You should have received a copy of the GNU Lesser General Public License
 # along with PyCha.  If not, see <http://www.gnu.org/licenses/>.
 
-from six.moves import reduce, xrange
+from functools import reduce
 
 from pycha.bar import BarChart, VerticalBarChart, HorizontalBarChart, Rect
 from pycha.chart import uniqueIndices
@@ -40,9 +40,9 @@ class StackedBarChart(BarChart):
             n_stores = len(stores)
             flat_y = [pair[1] for pair in reduce(lambda a, b: a + b, stores)]
             store_size = len(flat_y) // n_stores
-            accum = [sum(flat_y[j]for j in xrange(i,
-                                                  i + store_size * n_stores,
-                                                  store_size))
+            accum = [sum(flat_y[j]for j in range(i,
+                                                 i + store_size * n_stores,
+                                                 store_size))
                      for i in range(len(flat_y) // n_stores)]
             self.yrange = float(max(accum))
             if self.yrange == 0:
Index: pycha-0.8.1/setup.py
===================================================================
--- pycha-0.8.1.orig/setup.py
+++ pycha-0.8.1/setup.py
@@ -26,7 +26,6 @@ def read(*rnames):
 
 
 base_requirements = [
-    'six',
     'cairocffi',
 ]
 
Index: pycha-0.8.1/pycha/utils.py
===================================================================
--- pycha-0.8.1.orig/pycha/utils.py
+++ pycha-0.8.1/pycha/utils.py
@@ -16,9 +16,7 @@
 # You should have received a copy of the GNU Lesser General Public License
 # along with PyCha.  If not, see <http://www.gnu.org/licenses/>.
 
-import six
-
-unicode = six.text_type
+unicode = str
 
 
 def clamp(minValue, maxValue, value):

Reply via email to