From abd90e546ded4cbf2d0e6f745be85c646dd0aa4f Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Wed, 10 May 2023 03:14:04 +0200 Subject: [PATCH] Fix test_milp_timeout failure Resolves: rhbz#2172559 --- fix_test_milp_timeout.patch | 53 +++++++++++++++++++++++++++++++++++++ python3.11-scipy.spec | 10 ++++++- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 fix_test_milp_timeout.patch diff --git a/fix_test_milp_timeout.patch b/fix_test_milp_timeout.patch new file mode 100644 index 0000000..83a3e90 --- /dev/null +++ b/fix_test_milp_timeout.patch @@ -0,0 +1,53 @@ +From 9b068e5a68d9efd9c2403e9499b2c381b6c1d3a6 Mon Sep 17 00:00:00 2001 +From: Matt Haberland +Date: Fri, 21 Apr 2023 07:07:41 -0700 +Subject: [PATCH 1/2] MAINT: optimize: fix test_milp_timeout + +--- + scipy/optimize/tests/test_milp.py | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/scipy/optimize/tests/test_milp.py b/scipy/optimize/tests/test_milp.py +index 51996642..1f60fce3 100644 +--- a/scipy/optimize/tests/test_milp.py ++++ b/scipy/optimize/tests/test_milp.py +@@ -279,9 +279,7 @@ _msg_iter = "Iteration limit reached. (HiGHS Status 14:" + + @pytest.mark.skipif(np.intp(0).itemsize < 8, + reason="Unhandled 32-bit GCC FP bug") +-@pytest.mark.slow +-@pytest.mark.timeout(360) +-@pytest.mark.parametrize(["options", "msg"], [({"time_limit": 10}, _msg_time), ++@pytest.mark.parametrize(["options", "msg"], [({"time_limit": 0.1}, _msg_time), + ({"node_limit": 1}, _msg_iter)]) + def test_milp_timeout_16545(options, msg): + # Ensure solution is not thrown away if MILP solver times out +-- +2.40.0 + + +From 024568a4f4292e7b22643f40ae61d33d273cf674 Mon Sep 17 00:00:00 2001 +From: Matt Haberland +Date: Sat, 22 Apr 2023 15:43:07 -0700 +Subject: [PATCH 2/2] Update scipy/optimize/tests/test_milp.py + +[skip ci] +--- + scipy/optimize/tests/test_milp.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/scipy/optimize/tests/test_milp.py b/scipy/optimize/tests/test_milp.py +index 1f60fce3..42dae29a 100644 +--- a/scipy/optimize/tests/test_milp.py ++++ b/scipy/optimize/tests/test_milp.py +@@ -279,6 +279,7 @@ _msg_iter = "Iteration limit reached. (HiGHS Status 14:" + + @pytest.mark.skipif(np.intp(0).itemsize < 8, + reason="Unhandled 32-bit GCC FP bug") ++@pytest.mark.slow + @pytest.mark.parametrize(["options", "msg"], [({"time_limit": 0.1}, _msg_time), + ({"node_limit": 1}, _msg_iter)]) + def test_milp_timeout_16545(options, msg): +-- +2.40.0 + diff --git a/python3.11-scipy.spec b/python3.11-scipy.spec index e2e5b99..a3cc53b 100644 --- a/python3.11-scipy.spec +++ b/python3.11-scipy.spec @@ -22,7 +22,7 @@ Summary: Scientific Tools for Python Name: python%{python3_pkgversion}-scipy Version: 1.10.1 -Release: 1%{?dist} +Release: 2%{?dist} # BSD -- whole package except: # Boost -- scipy/special/cephes/scipy_iv.c @@ -31,6 +31,11 @@ License: BSD and Boost and Public Domain Url: http://www.scipy.org/scipylib/index.html Source0: https://github.com/scipy/scipy/releases/download/v%{version}/scipy-%{version}.tar.gz + +# Fix test_milp_timeout failure +# Resolved upstream: https://github.com/scipy/scipy/pull/18339 +Patch0: fix_test_milp_timeout.patch + BuildRequires: fftw-devel, suitesparse-devel BuildRequires: %{blaslib}-devel BuildRequires: gcc-gfortran, swig, gcc-c++ @@ -213,6 +218,9 @@ popd %{python3_sitearch}/*.egg-info %changelog +* Wed May 10 2023 Charalampos Stratakis - 1.10.1-2 +- Fix test_milp_timeout failure + * Tue May 02 2023 Ryan Erickson - 1.10.1-1 - Update to 1.10.1