From b563780765d063b298f525f5f833739dada3244782774eedc3c453375df82bd7 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 20 Jul 2022 11:01:20 +0000 Subject: [PATCH] - Add patch support-setuptools-62.patch: * Support setuptools >= 62 by handling more than one warning in a test case. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-joblib?expand=0&rev=50 --- python-joblib.changes | 7 +++++++ python-joblib.spec | 8 ++++---- support-setuptools-62.patch | 13 +++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 support-setuptools-62.patch diff --git a/python-joblib.changes b/python-joblib.changes index 6837f0a..90e9e6a 100644 --- a/python-joblib.changes +++ b/python-joblib.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jul 20 11:00:18 UTC 2022 - Steve Kowalik + +- Add patch support-setuptools-62.patch: + * Support setuptools >= 62 by handling more than one warning in a test + case. + ------------------------------------------------------------------- Sat Oct 16 21:31:20 UTC 2021 - Dirk Müller diff --git a/python-joblib.spec b/python-joblib.spec index 0966187..95a5c73 100644 --- a/python-joblib.spec +++ b/python-joblib.spec @@ -1,7 +1,7 @@ # # spec file for package python-joblib # -# Copyright (c) 2021 SUSE LLC +# 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 @@ -23,17 +23,17 @@ Version: 1.1.0 Release: 0 Summary: Module for using Python functions as pipeline jobs License: BSD-3-Clause -Group: Development/Languages/Python URL: https://github.com/joblib/joblib Source: https://files.pythonhosted.org/packages/source/j/joblib/joblib-%{version}.tar.gz +Patch0: support-setuptools-62.patch BuildRequires: %{python_module lz4} +BuildRequires: %{python_module numpy} BuildRequires: %{python_module psutil} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module threadpoolctl} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: %{python_module numpy if (%python-base without python36-base)} Recommends: python-lz4 Recommends: python-numpy Recommends: python-psutil @@ -55,7 +55,7 @@ Python. In particular, joblib offers: Joblib can handle large data and has specific optimizations for `numpy` arrays. %prep -%setup -q -n joblib-%{version} +%autosetup -p1 -n joblib-%{version} %build %python_build diff --git a/support-setuptools-62.patch b/support-setuptools-62.patch new file mode 100644 index 0000000..cf80b60 --- /dev/null +++ b/support-setuptools-62.patch @@ -0,0 +1,13 @@ +Index: joblib-1.1.0/joblib/test/test_numpy_pickle.py +=================================================================== +--- joblib-1.1.0.orig/joblib/test/test_numpy_pickle.py ++++ joblib-1.1.0/joblib/test/test_numpy_pickle.py +@@ -279,7 +279,7 @@ def test_compress_mmap_mode_warning(tmpd + numpy_pickle.dump(a, this_filename, compress=1) + with warns(UserWarning) as warninfo: + numpy_pickle.load(this_filename, mmap_mode='r+') +- assert len(warninfo) == 1 ++ assert len(warninfo) >= 1 + assert (str(warninfo[0].message) == + 'mmap_mode "%(mmap_mode)s" is not compatible with compressed ' + 'file %(filename)s. "%(mmap_mode)s" flag will be ignored.' %