Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-allpairspy for openSUSE:Factory checked in at 2022-09-14 13:45:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-allpairspy (Old) and /work/SRC/openSUSE:Factory/.python-allpairspy.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-allpairspy" Wed Sep 14 13:45:17 2022 rev:2 rq:1003475 version:2.5.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-allpairspy/python-allpairspy.changes 2020-02-11 22:24:17.863531163 +0100 +++ /work/SRC/openSUSE:Factory/.python-allpairspy.new.2083/python-allpairspy.changes 2022-09-14 13:45:31.081975203 +0200 @@ -1,0 +2,8 @@ +Tue Sep 13 15:29:12 UTC 2022 - pgaj...@suse.com + +- do not require six +- added patches + fix https://github.com/thombashi/allpairspy/commit/f6dcb1f3e5bc50b98422fee9c6d6fa8d5e7bc038 + + python-allpairspy-no-six.patch + +------------------------------------------------------------------- New: ---- python-allpairspy-no-six.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-allpairspy.spec ++++++ --- /var/tmp/diff_new_pack.NwnfqM/_old 2022-09-14 13:45:31.513976291 +0200 +++ /var/tmp/diff_new_pack.NwnfqM/_new 2022-09-14 13:45:31.521976311 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-allpairspy # -# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,8 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# %{?!python_module:%define python_module() python-%{**} python3-%{**}} @@ -21,17 +22,17 @@ Release: 0 License: MIT Summary: Pairwise test combinations generator -Url: https://github.com/thombashi/allpairspy +URL: https://github.com/thombashi/allpairspy Group: Development/Languages/Python Source: https://github.com/thombashi/allpairspy/archive/v%{version}.tar.gz#/allpairspy-%{version}.tar.gz -BuildRequires: python-rpm-macros +# https://github.com/thombashi/allpairspy/commit/f6dcb1f3e5bc50b98422fee9c6d6fa8d5e7bc038 +Patch0: python-allpairspy-no-six.patch BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros # SECTION test requirements -BuildRequires: %{python_module six >= 1.10.0} BuildRequires: %{python_module pytest} # /SECTION BuildRequires: fdupes -Requires: python-six >= 1.10.0 Suggests: python-twine Suggests: python-wheel Suggests: python-releasecmd >= 0.0.18 @@ -43,7 +44,7 @@ Pairwise test combinations generator. %prep -%setup -q -n allpairspy-%{version} +%autosetup -p1 -n allpairspy-%{version} %build %python_build ++++++ python-allpairspy-no-six.patch ++++++ diff --git a/allpairspy/allpairs.py b/allpairspy/allpairs.py index 0164906..b8b1a82 100644 --- a/allpairspy/allpairs.py +++ b/allpairspy/allpairs.py @@ -1,16 +1,11 @@ -# encoding: utf-8 - from collections import OrderedDict, namedtuple -from functools import cmp_to_key +from functools import cmp_to_key, reduce from itertools import combinations -import six -from six.moves import range, reduce - from .pairs_storage import PairsStorage, key -class Item(object): +class Item(object): @property def id(self): return self.__item_id @@ -48,7 +43,7 @@ def cmp_item(lhs, rhs): return -1 if lhs.weights < rhs.weights else 1 -class AllPairs(object): +class AllPairs(object): def __init__(self, parameters, filter_func=lambda x: True, previously_tested=None, n=2): """ TODO: check that input arrays are: @@ -160,7 +155,7 @@ def __next__(self): def __validate_parameter(self, value): if isinstance(value, OrderedDict): - for parameter_list in six.itervalues(value): + for parameter_list in value.values(): if not parameter_list: raise ValueError("each parameter arrays must have at least one item") @@ -180,7 +175,7 @@ def __resort_working_array(self, chosen_item_list, num): new_combs = [ # numbers of new combinations to be created if this item is # appended to array - set([key(z) for z in combinations(chosen_item_list + [item], i + 1)]) + {key(z) for z in combinations(chosen_item_list + [item], i + 1)} - self.__pairs.get_combs()[i] for i in range(0, self.__n) ] @@ -233,4 +228,4 @@ def __extract_value_matrix(self, parameters): if not self.__is_ordered_dict_param: return parameters - return [v for v in six.itervalues(parameters)] + return [v for v in parameters.values()] diff --git a/allpairspy/pairs_storage.py b/allpairspy/pairs_storage.py index 163b492..8de0329 100644 --- a/allpairspy/pairs_storage.py +++ b/allpairspy/pairs_storage.py @@ -1,11 +1,7 @@ -# encoding: utf-8 - from itertools import combinations -from six.moves import range - -class Node(object): +class Node(object): @property def id(self): return self.__node_id @@ -40,7 +36,7 @@ def key(items): return key_value -class PairsStorage(object): +class PairsStorage(object): def __init__(self, n): self.__n = n self.__nodes = {} diff --git a/requirements/requirements.txt b/requirements/requirements.txt index d270018..e69de29 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1 +0,0 @@ -six>=1.10.0,<2.0.0