Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pyemd for openSUSE:Factory checked in at 2023-01-28 18:44:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pyemd (Old) and /work/SRC/openSUSE:Factory/.python-pyemd.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyemd" Sat Jan 28 18:44:14 2023 rev:3 rq:1061595 version:0.5.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pyemd/python-pyemd.changes 2021-04-23 17:50:57.622828705 +0200 +++ /work/SRC/openSUSE:Factory/.python-pyemd.new.32243/python-pyemd.changes 2023-01-28 19:02:16.872371179 +0100 @@ -1,0 +2,10 @@ +Fri Jan 27 16:27:19 UTC 2023 - Matej Cepl <mc...@suse.com> + +- Clean up SPEC file + +------------------------------------------------------------------- +Fri Jan 27 09:11:00 UTC 2023 - Markéta Machová <mmach...@suse.com> + +- Add numpy-arrays.patch to fix compatibility with newer NumPy + +------------------------------------------------------------------- New: ---- numpy-arrays.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pyemd.spec ++++++ --- /var/tmp/diff_new_pack.ketLk5/_old 2023-01-28 19:02:17.248373252 +0100 +++ /var/tmp/diff_new_pack.ketLk5/_new 2023-01-28 19:02:17.252373274 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-pyemd # -# Copyright (c) 2021 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,18 +16,19 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python36 1 # pytest is too smart for its own good, prevent use of compiled version %bcond_with test -%define skip_python36 1 Name: python-pyemd Version: 0.5.1 Release: 0 Summary: Python implementation of the Earth Mover's Distance License: MIT Group: Development/Languages/Python -URL: http://github.com/wmayner/pyemd +URL: https://github.com/wmayner/pyemd Source: https://files.pythonhosted.org/packages/source/p/pyemd/pyemd-%{version}.tar.gz +# PATCH-FIX-UPSTREAM https://github.com/wmayner/pyemd/commit/34631658ae0cc555001b692623c23c02ed8d5611 Mark uses of ragged nested sequences in NumPy arrays as intented +Patch0: numpy-arrays.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module numpy-devel >= 1.9.0} BuildRequires: %{python_module setuptools} @@ -45,7 +46,8 @@ of the Earth Mover's Distance that allows it to be used with NumPy. %prep -%setup -q -n pyemd-%{version} +%autosetup -p1 -n pyemd-%{version} + sed -i -e '/^#!\//, 1d' pyemd/__about__.py pyemd/__init__.py %build @@ -59,15 +61,14 @@ %check mv conftest.py conftest_bad.py_bad pushd test -%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} -$python -m pytest -} +%pytest_arch popd mv conftest_bad.py_bad conftest.py %files %{python_files} %doc README.rst %license LICENSE -%{python_sitearch}/* +%{python_sitearch}/pyemd +%{python_sitearch}/pyemd-%{version}*-info %changelog ++++++ numpy-arrays.patch ++++++ >From 34631658ae0cc555001b692623c23c02ed8d5611 Mon Sep 17 00:00:00 2001 From: Paul Wise <pa...@bonedaddy.net> Date: Mon, 2 Aug 2021 14:55:06 +0800 Subject: [PATCH] Mark uses of ragged nested sequences in NumPy arrays as intented for two tests The tests check that emd() raises a ValueError when passed incorrect matrices. The ragged sequences are now deprecated in NumPy unless marked as intended: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray. --- test/test_pyemd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_pyemd.py b/test/test_pyemd.py index 96c7ce2..9345cb8 100644 --- a/test/test_pyemd.py +++ b/test/test_pyemd.py @@ -130,7 +130,7 @@ def test_emd_validate_symmetric_distance_matrix(): first_signature = np.array([0.0, 1.0]) second_signature = np.array([5.0, 3.0]) distance_matrix = np.array([[0.0, 0.5, 3.0], - [0.5, 0.0]]) + [0.5, 0.0]], dtype=object) with pytest.raises(ValueError): emd(first_signature, second_signature, distance_matrix) @@ -276,7 +276,7 @@ def test_emd_with_flow_validate_square_distance_matrix(): first_signature = np.array([0.0, 1.0]) second_signature = np.array([5.0, 3.0]) distance_matrix = np.array([[0.0, 0.5, 3.0], - [0.5, 0.0]]) + [0.5, 0.0]], dtype=object) with pytest.raises(ValueError): emd_with_flow(first_signature, second_signature, distance_matrix)