14
0
forked from pool/python-joblib
Files
python-joblib/python-joblib.spec

120 lines
4.2 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-joblib
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-joblib
Version: 1.5.1
Release: 0
Summary: Module for using Python functions as pipeline jobs
License: BSD-3-Clause
URL: https://github.com/joblib/joblib
Source: https://files.pythonhosted.org/packages/source/j/joblib/joblib-%{version}.tar.gz
# PATCH-FIX-OPENSUSE Also avoid a DeprecationWarning when using fork() under
# multiprocessing
Patch1: also-filter-new-fork-warning.patch
Accepting request 1009807 from home:bnavigator:branches:devel:languages:python:numeric - Update to 1.2.0 * Fix a security issue where eval(pre_dispatch) could potentially run arbitrary code. Now only basic numerics are supported. #1327 * Make sure that joblib works even when multiprocessing is not available, for instance with Pyodide #1256 * Avoid unnecessary warnings when workers and main process delete the temporary memmap folder contents concurrently. #1263 * Vendor loky 3.1.0 with several fixes to more robustly forcibly terminate worker processes in case of a crash. #1269 * Fix memory alignment bug for pickles containing numpy arrays. This is especially important when loading the pickle with mmap_mode != None as the resulting numpy.memmap object would not be able to correct the misalignment without performing a memory copy. This bug would cause invalid computation and segmentation faults with native code that would directly access the underlying data buffer of a numpy array, for instance C/C++/Cython code compiled with older GCC versions or some old OpenBLAS written in platform specific assembly. #1254 * Vendor cloudpickle 2.2.0 which adds support for PyPy 3.8+. * Vendor loky 3.3.0 which fixes a bug with leaking processes in case of nested loky parallel calls and more reliability spawn the correct number of reusable workers. - Drop support-setuptools-62.patch OBS-URL: https://build.opensuse.org/request/show/1009807 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-joblib?expand=0&rev=52
2022-10-11 15:42:53 +00:00
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module lz4}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pip}
Accepting request 663427 from home:TheBlackCat:branches:devel:languages:python - update to Release 0.13.0 * Include loky 2.4.2 with default serialization with ``cloudpickle``. This can be tweaked with the environment variable ``LOKY_PICKLER``. * Fix nested backend in SequentialBackend to avoid changing the default backend to Sequential. (#792) * Fix nested_backend behavior to avoid setting the default number of workers to -1 when the backend is not dask. (#784) - Update to Release 0.12.5 * Include loky 2.3.1 with better error reporting when a worker is abruptly terminated. Also fixes spurious debug output. * Include cloudpickle 0.5.6. Fix a bug with the handling of global variables by locally defined functions. - Update to Release 0.12.4 * Include loky 2.3.0 with many bugfixes, notably w.r.t. when setting non-default multiprocessing contexts. Also include improvement on memory management of long running worker processes and fixed issues when using the loky backend under PyPy. * Raises a more explicit exception when a corrupted MemorizedResult is loaded. * Loading a corrupted cached file with mmap mode enabled would recompute the results and return them without memmory mapping. - Update to Release 0.12.3 * Fix joblib import setting the global start_method for multiprocessing. * Fix MemorizedResult not picklable (#747). * Fix Memory, MemorizedFunc and MemorizedResult round-trip pickling + unpickling (#746). * Fixed a regression in Memory when positional arguments are called as kwargs several times with different values (#751). * Integration of loky 2.2.2 that fixes issues with the selection of the default start method and improve the reporting when calling functions with arguments that raise an exception when unpickling. * Prevent MemorizedFunc.call_and_shelve from loading cached results to RAM when not necessary. Results in big performance improvements - Update to Release 0.12.2 * Integrate loky 2.2.0 to fix regression with unpicklable arguments and functions reported by users (#723, #643). * Loky 2.2.0 also provides a protection against memory leaks long running applications when psutil is installed (reported as #721). * Joblib now includes the code for the dask backend which has been updated to properly handle nested parallelism and data scattering at the same time (#722). * Restored some private API attribute and arguments (`MemorizedResult.argument_hash` and `BatchedCalls.__init__`'s `pickle_cache`) for backward compat. (#716, #732). * Fix a deprecation warning message (for `Memory`'s `cachedir`) (#720). OBS-URL: https://build.opensuse.org/request/show/663427 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-joblib?expand=0&rev=20
2019-01-07 20:40:52 +00:00
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module threadpoolctl}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Accepting request 872790 from home:bnavigator:branches:devel:languages:python - Update to 1.0.1 * dask: avoid redundant scattering of large arguments to make a more efficient use of the network resources and avoid crashing dask with "OSError: [Errno 55] No buffer space available" or "ConnectionResetError: [Errno 104] connection reset by peer". - Changees in 1.0.0 * Make joblib.hash and joblib.Memory caching system compatible with numpy >= 1.20.0. Also make it explicit in the documentation that users should now expect to have their joblib. Memory cache invalidated when either joblib or a third party library involved in the cached values definition is upgraded. In particular, users updating joblib to a release that includes this fix will see their previous cache invalidated if they contained reference to numpy objects. * Remove deprecated check_pickle argument in delayed. - Changes in 0.17.0 * Fix a spurious invalidation of Memory.cache'd functions called with Parallel under Jupyter or IPython. * Bump vendored loky to 2.9.0 and cloudpickle to 1.6.0. In particular this fixes a problem to add compat for Python 3.9. - Don't require optional NumPy for python36 tests in TW, because NumPy 1.20 dropped support for Python 3.6 (NEP 29) - Drop joblib-disable-unrelialble-tests.patch, they are already used in pytest deselection parameter. * Do the same for disable_test_on_big_endian.patch. OBS-URL: https://build.opensuse.org/request/show/872790 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-joblib?expand=0&rev=47
2021-02-16 13:41:21 +00:00
Recommends: python-lz4
Accepting request 663427 from home:TheBlackCat:branches:devel:languages:python - update to Release 0.13.0 * Include loky 2.4.2 with default serialization with ``cloudpickle``. This can be tweaked with the environment variable ``LOKY_PICKLER``. * Fix nested backend in SequentialBackend to avoid changing the default backend to Sequential. (#792) * Fix nested_backend behavior to avoid setting the default number of workers to -1 when the backend is not dask. (#784) - Update to Release 0.12.5 * Include loky 2.3.1 with better error reporting when a worker is abruptly terminated. Also fixes spurious debug output. * Include cloudpickle 0.5.6. Fix a bug with the handling of global variables by locally defined functions. - Update to Release 0.12.4 * Include loky 2.3.0 with many bugfixes, notably w.r.t. when setting non-default multiprocessing contexts. Also include improvement on memory management of long running worker processes and fixed issues when using the loky backend under PyPy. * Raises a more explicit exception when a corrupted MemorizedResult is loaded. * Loading a corrupted cached file with mmap mode enabled would recompute the results and return them without memmory mapping. - Update to Release 0.12.3 * Fix joblib import setting the global start_method for multiprocessing. * Fix MemorizedResult not picklable (#747). * Fix Memory, MemorizedFunc and MemorizedResult round-trip pickling + unpickling (#746). * Fixed a regression in Memory when positional arguments are called as kwargs several times with different values (#751). * Integration of loky 2.2.2 that fixes issues with the selection of the default start method and improve the reporting when calling functions with arguments that raise an exception when unpickling. * Prevent MemorizedFunc.call_and_shelve from loading cached results to RAM when not necessary. Results in big performance improvements - Update to Release 0.12.2 * Integrate loky 2.2.0 to fix regression with unpicklable arguments and functions reported by users (#723, #643). * Loky 2.2.0 also provides a protection against memory leaks long running applications when psutil is installed (reported as #721). * Joblib now includes the code for the dask backend which has been updated to properly handle nested parallelism and data scattering at the same time (#722). * Restored some private API attribute and arguments (`MemorizedResult.argument_hash` and `BatchedCalls.__init__`'s `pickle_cache`) for backward compat. (#716, #732). * Fix a deprecation warning message (for `Memory`'s `cachedir`) (#720). OBS-URL: https://build.opensuse.org/request/show/663427 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-joblib?expand=0&rev=20
2019-01-07 20:40:52 +00:00
Recommends: python-numpy
Recommends: python-psutil
Accepting request 872790 from home:bnavigator:branches:devel:languages:python - Update to 1.0.1 * dask: avoid redundant scattering of large arguments to make a more efficient use of the network resources and avoid crashing dask with "OSError: [Errno 55] No buffer space available" or "ConnectionResetError: [Errno 104] connection reset by peer". - Changees in 1.0.0 * Make joblib.hash and joblib.Memory caching system compatible with numpy >= 1.20.0. Also make it explicit in the documentation that users should now expect to have their joblib. Memory cache invalidated when either joblib or a third party library involved in the cached values definition is upgraded. In particular, users updating joblib to a release that includes this fix will see their previous cache invalidated if they contained reference to numpy objects. * Remove deprecated check_pickle argument in delayed. - Changes in 0.17.0 * Fix a spurious invalidation of Memory.cache'd functions called with Parallel under Jupyter or IPython. * Bump vendored loky to 2.9.0 and cloudpickle to 1.6.0. In particular this fixes a problem to add compat for Python 3.9. - Don't require optional NumPy for python36 tests in TW, because NumPy 1.20 dropped support for Python 3.6 (NEP 29) - Drop joblib-disable-unrelialble-tests.patch, they are already used in pytest deselection parameter. * Do the same for disable_test_on_big_endian.patch. OBS-URL: https://build.opensuse.org/request/show/872790 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-joblib?expand=0&rev=47
2021-02-16 13:41:21 +00:00
Suggests: python-dask-distributed
BuildArch: noarch
%python_subpackages
%description
Joblib is a set of tools to provide lightweight pipelining in
Python. In particular, joblib offers:
1. transparent disk-caching of the output values and lazy re-evaluation
(memoize pattern)
2. parallel computing
3. logging and tracing of the execution
Joblib can handle large data and has specific optimizations for `numpy` arrays.
%prep
%autosetup -p1 -n joblib-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
Accepting request 663427 from home:TheBlackCat:branches:devel:languages:python - update to Release 0.13.0 * Include loky 2.4.2 with default serialization with ``cloudpickle``. This can be tweaked with the environment variable ``LOKY_PICKLER``. * Fix nested backend in SequentialBackend to avoid changing the default backend to Sequential. (#792) * Fix nested_backend behavior to avoid setting the default number of workers to -1 when the backend is not dask. (#784) - Update to Release 0.12.5 * Include loky 2.3.1 with better error reporting when a worker is abruptly terminated. Also fixes spurious debug output. * Include cloudpickle 0.5.6. Fix a bug with the handling of global variables by locally defined functions. - Update to Release 0.12.4 * Include loky 2.3.0 with many bugfixes, notably w.r.t. when setting non-default multiprocessing contexts. Also include improvement on memory management of long running worker processes and fixed issues when using the loky backend under PyPy. * Raises a more explicit exception when a corrupted MemorizedResult is loaded. * Loading a corrupted cached file with mmap mode enabled would recompute the results and return them without memmory mapping. - Update to Release 0.12.3 * Fix joblib import setting the global start_method for multiprocessing. * Fix MemorizedResult not picklable (#747). * Fix Memory, MemorizedFunc and MemorizedResult round-trip pickling + unpickling (#746). * Fixed a regression in Memory when positional arguments are called as kwargs several times with different values (#751). * Integration of loky 2.2.2 that fixes issues with the selection of the default start method and improve the reporting when calling functions with arguments that raise an exception when unpickling. * Prevent MemorizedFunc.call_and_shelve from loading cached results to RAM when not necessary. Results in big performance improvements - Update to Release 0.12.2 * Integrate loky 2.2.0 to fix regression with unpicklable arguments and functions reported by users (#723, #643). * Loky 2.2.0 also provides a protection against memory leaks long running applications when psutil is installed (reported as #721). * Joblib now includes the code for the dask backend which has been updated to properly handle nested parallelism and data scattering at the same time (#722). * Restored some private API attribute and arguments (`MemorizedResult.argument_hash` and `BatchedCalls.__init__`'s `pickle_cache`) for backward compat. (#716, #732). * Fix a deprecation warning message (for `Memory`'s `cachedir`) (#720). OBS-URL: https://build.opensuse.org/request/show/663427 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-joblib?expand=0&rev=20
2019-01-07 20:40:52 +00:00
export LANG=en_US.UTF-8
# turn off unreliable tests across architectures
# https://bugzilla.suse.com/show_bug.cgi?id=1177209
# they have been seen failing for the first time on following
# architectures:
# s390x:
# test_hash_numpy_noncontiguous
# test_hashes_are_different_between_c_and_fortran_contiguous_arrays
# test_hashes_stay_the_same_with_numpy_objects
# test_non_contiguous_array_pickling
# x86_64:
# test_multithreaded_parallel_termination_resource_tracker_silent
# aarch64:
# test_resource_tracker_silent_when_reference_cycles
# test_child_raises_parent_exits_cleanly
# i586:
# test_nested_loop_error_in_grandchild_resource_tracker_silent
Accepting request 872790 from home:bnavigator:branches:devel:languages:python - Update to 1.0.1 * dask: avoid redundant scattering of large arguments to make a more efficient use of the network resources and avoid crashing dask with "OSError: [Errno 55] No buffer space available" or "ConnectionResetError: [Errno 104] connection reset by peer". - Changees in 1.0.0 * Make joblib.hash and joblib.Memory caching system compatible with numpy >= 1.20.0. Also make it explicit in the documentation that users should now expect to have their joblib. Memory cache invalidated when either joblib or a third party library involved in the cached values definition is upgraded. In particular, users updating joblib to a release that includes this fix will see their previous cache invalidated if they contained reference to numpy objects. * Remove deprecated check_pickle argument in delayed. - Changes in 0.17.0 * Fix a spurious invalidation of Memory.cache'd functions called with Parallel under Jupyter or IPython. * Bump vendored loky to 2.9.0 and cloudpickle to 1.6.0. In particular this fixes a problem to add compat for Python 3.9. - Don't require optional NumPy for python36 tests in TW, because NumPy 1.20 dropped support for Python 3.6 (NEP 29) - Drop joblib-disable-unrelialble-tests.patch, they are already used in pytest deselection parameter. * Do the same for disable_test_on_big_endian.patch. OBS-URL: https://build.opensuse.org/request/show/872790 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-joblib?expand=0&rev=47
2021-02-16 13:41:21 +00:00
#
# always fails:
# test_parallel_call_cached_function_defined_in_jupyter
DISABLED_TESTS="test_multithreaded_parallel_termination_resource_tracker_silent or \
test_resource_tracker_silent_when_reference_cycles or \
test_child_raises_parent_exits_cleanly or \
test_nested_loop_error_in_grandchild_resource_tracker_silent or \
Accepting request 872790 from home:bnavigator:branches:devel:languages:python - Update to 1.0.1 * dask: avoid redundant scattering of large arguments to make a more efficient use of the network resources and avoid crashing dask with "OSError: [Errno 55] No buffer space available" or "ConnectionResetError: [Errno 104] connection reset by peer". - Changees in 1.0.0 * Make joblib.hash and joblib.Memory caching system compatible with numpy >= 1.20.0. Also make it explicit in the documentation that users should now expect to have their joblib. Memory cache invalidated when either joblib or a third party library involved in the cached values definition is upgraded. In particular, users updating joblib to a release that includes this fix will see their previous cache invalidated if they contained reference to numpy objects. * Remove deprecated check_pickle argument in delayed. - Changes in 0.17.0 * Fix a spurious invalidation of Memory.cache'd functions called with Parallel under Jupyter or IPython. * Bump vendored loky to 2.9.0 and cloudpickle to 1.6.0. In particular this fixes a problem to add compat for Python 3.9. - Don't require optional NumPy for python36 tests in TW, because NumPy 1.20 dropped support for Python 3.6 (NEP 29) - Drop joblib-disable-unrelialble-tests.patch, they are already used in pytest deselection parameter. * Do the same for disable_test_on_big_endian.patch. OBS-URL: https://build.opensuse.org/request/show/872790 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-joblib?expand=0&rev=47
2021-02-16 13:41:21 +00:00
test_parallel_call_cached_function_defined_in_jupyter"
if [ $(python3 -c 'import sys; print(sys.byteorder)') != "little" ]; then
DISABLED_TESTS+=" or test_joblib_pickle_across_python_versions or \
test_hash_numpy_noncontiguous or \
test_hashes_are_different_between_c_and_fortran_contiguous_arrays or \
test_hashes_stay_the_same_with_numpy_objects or \
test_non_contiguous_array_pickling"
fi
# memmaping tests fail on Python 3.13.7 https://github.com/joblib/loky/issues/459
DISABLED_TESTS+=" or test_permission_error_windows_memmap_sent_to_parent or \
test_many_parallel_calls_on_same_object or \
test_memmapping_pool_for_large_arrays or \
test_memmapping_on_large_enough_dev_shm or \
test_memmapping_leaks"
%pytest -k "not ($DISABLED_TESTS)"
%files %{python_files}
%license LICENSE.txt
%doc README.rst
%{python_sitelib}/joblib-%{version}.dist-info
%{python_sitelib}/joblib/
%changelog