Hello community, here is the log from the commit of package python-lmfit for openSUSE:Factory checked in at 2019-01-21 10:59:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-lmfit (Old) and /work/SRC/openSUSE:Factory/.python-lmfit.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-lmfit" Mon Jan 21 10:59:51 2019 rev:2 rq:666943 version:0.9.12 Changes: -------- --- /work/SRC/openSUSE:Factory/python-lmfit/python-lmfit.changes 2018-06-22 13:30:24.401687712 +0200 +++ /work/SRC/openSUSE:Factory/.python-lmfit.new.28833/python-lmfit.changes 2019-01-21 11:01:54.503154573 +0100 @@ -1,0 +2,14 @@ +Fri Jan 18 10:24:44 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Apply patch to fix build with new scipy: + * lmfit-scipy.patch + +------------------------------------------------------------------- +Fri Jan 18 10:19:27 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Update to 0.9.12: + * make exceptions explicit + * use inspect.getfullargspec for Python3 + * test-suite: use pytest features, improve coverage, fix mistakes + +------------------------------------------------------------------- Old: ---- lmfit-0.9.10.tar.gz New: ---- lmfit-0.9.12.tar.gz lmfit-scipy.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-lmfit.spec ++++++ --- /var/tmp/diff_new_pack.b9KvLj/_old 2019-01-21 11:01:58.035150017 +0100 +++ /var/tmp/diff_new_pack.b9KvLj/_new 2019-01-21 11:01:58.039150013 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-lmfit # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,27 +12,27 @@ # 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-%{**}} Name: python-lmfit -Version: 0.9.10 +Version: 0.9.12 Release: 0 Summary: Least-Squares Minimization with Bounds and Constraints -License: MIT and BSD-3-Clause +License: MIT AND BSD-3-Clause Group: Development/Languages/Python Url: https://lmfit.github.io/lmfit-py/ Source: https://files.pythonhosted.org/packages/source/l/lmfit/lmfit-%{version}.tar.gz -BuildRequires: %{python_module devel} +Patch0: lmfit-scipy.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros # SECTION test requirements BuildRequires: %{python_module asteval} -BuildRequires: %{python_module nose} BuildRequires: %{python_module numpy} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module scipy} BuildRequires: %{python_module six} BuildRequires: %{python_module uncertainties} @@ -71,6 +71,7 @@ %prep %setup -q -n lmfit-%{version} +%patch0 -p1 sed -i -e '/^#!\//, 1d' lmfit/jsonutils.py %build @@ -81,11 +82,7 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -pushd tests -%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} -nosetests-%{$python_bin_suffix} -} -popd +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} -v %files %{python_files} %doc README.rst THANKS.txt ++++++ lmfit-0.9.10.tar.gz -> lmfit-0.9.12.tar.gz ++++++ ++++ 10297 lines of diff (skipped) ++++++ lmfit-scipy.patch ++++++ >From 23d6975448825291c8acb725c8fad360aadbe9a3 Mon Sep 17 00:00:00 2001 From: reneeotten <[email protected]> Date: Thu, 10 Jan 2019 11:49:06 -0500 Subject: [PATCH] TST: fix nan_policy_test for differential_evolution In SciPy version 1.2 this gives a RuntimeError instead of ValueError. --- tests/test_nose.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/test_nose.py b/tests/test_nose.py index 25ba4b39..5e2ef1c1 100644 --- a/tests/test_nose.py +++ b/tests/test_nose.py @@ -5,6 +5,7 @@ from numpy.testing import (assert_, assert_allclose, assert_almost_equal, assert_equal, dec) import pytest +from scipy.version import version as scipy_version from uncertainties import ufloat from lmfit import Minimizer, Parameters, minimize @@ -394,9 +395,15 @@ def test_nan_policy(self): # the data returned by userfcn self.data[0] = np.nan + major, minor, _micro = scipy_version.split('.', 2) for method in SCALAR_METHODS: - pytest.raises(ValueError, self.mini.scalar_minimize, - SCALAR_METHODS[method]) + if (method == 'differential_evolution' and int(major) > 0 and + int(minor) >= 2): + pytest.raises(RuntimeError, self.mini.scalar_minimize, + SCALAR_METHODS[method]) + else: + pytest.raises(ValueError, self.mini.scalar_minimize, + SCALAR_METHODS[method]) pytest.raises(ValueError, self.mini.minimize)
