From ee1a1838dbc64264d618a8b09f9972ef520d62edcf98db4a3346ee05226b84de Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 23 Jun 2025 05:46:49 +0000 Subject: [PATCH] Accepting request 1287196 from home:mcalabkova:branches:devel:languages:python - Update to 1.5.1 * Vendor loky3.5.5 fixing the resource_tracker clean up with earlier Python versions * Enforce age_limit is a positive timedelta for Memory.reduce_size, to avoid silently ignoring it * Remove deprecated bytes_limit argument for Memory, which should be passed directly to Memory.reduce_size * Drop support for Python 3.8 * Support for Python 3.13 free-threaded has been added * Fix a regression in 1.3 and 1.4 that caused large big endian arrays to trigger a serialization error * Fix support for python 3.14 in hashing, with the addition of an extra argument in Pickler._batch_setitems * Use pickle protocol 5 for pickling numpy arrays with object type - Drop merged numpy22.patch and loky_resource_tracker.patch - BuildRequire python-pytest-asyncio to fix tests with pytest 8.4 OBS-URL: https://build.opensuse.org/request/show/1287196 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-joblib?expand=0&rev=71 --- also-filter-new-fork-warning.patch | 12 ++--- joblib-1.4.2.tar.gz | 3 -- joblib-1.5.1.tar.gz | 3 ++ loky_resource_tracker.patch | 82 ------------------------------ numpy22.patch | 22 -------- python-joblib.changes | 20 ++++++++ python-joblib.spec | 7 +-- 7 files changed, 31 insertions(+), 118 deletions(-) delete mode 100644 joblib-1.4.2.tar.gz create mode 100644 joblib-1.5.1.tar.gz delete mode 100644 loky_resource_tracker.patch delete mode 100644 numpy22.patch diff --git a/also-filter-new-fork-warning.patch b/also-filter-new-fork-warning.patch index cd725ee..7f7f750 100644 --- a/also-filter-new-fork-warning.patch +++ b/also-filter-new-fork-warning.patch @@ -1,10 +1,10 @@ -Index: joblib-1.3.2/joblib/test/test_parallel.py +Index: joblib-1.5.1/joblib/test/test_parallel.py =================================================================== ---- joblib-1.3.2.orig/joblib/test/test_parallel.py -+++ joblib-1.3.2/joblib/test/test_parallel.py -@@ -193,6 +193,11 @@ def test_main_thread_renamed_no_warning( - # warninfo catches Warnings from worker timeouts. We remove it if it exists - warninfo = [w for w in warninfo if "worker timeout" not in str(w.message)] +--- joblib-1.5.1.orig/joblib/test/test_parallel.py ++++ joblib-1.5.1/joblib/test/test_parallel.py +@@ -249,6 +249,11 @@ def test_main_thread_renamed_no_warning( + message_part = "multi-threaded, use of fork() may lead to deadlocks" + warninfo = [w for w in warninfo if message_part not in str(w.message)] + # There's a new warning in Python 3.12 about multiprocessing and forking + # that we filter out diff --git a/joblib-1.4.2.tar.gz b/joblib-1.4.2.tar.gz deleted file mode 100644 index 22595a8..0000000 --- a/joblib-1.4.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2382c5816b2636fbd20a09e0f4e9dad4736765fdfb7dca582943b9c1366b3f0e -size 2116621 diff --git a/joblib-1.5.1.tar.gz b/joblib-1.5.1.tar.gz new file mode 100644 index 0000000..0ace3e1 --- /dev/null +++ b/joblib-1.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4f86e351f39fe3d0d32a9f2c3d8af1ee4cec285aafcb27003dda5205576b444 +size 330475 diff --git a/loky_resource_tracker.patch b/loky_resource_tracker.patch deleted file mode 100644 index 237c2db..0000000 --- a/loky_resource_tracker.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 85c9aa634bbfb08d3ea692ff1cef5f5e25a0d71e Mon Sep 17 00:00:00 2001 -From: tommoral -Date: Tue, 15 Apr 2025 02:31:05 +0200 -Subject: [PATCH 1/6] FIX remove link to pid in child resource_tracker - ---- - joblib/externals/loky/backend/popen_loky_posix.py | 2 +- - joblib/externals/loky/backend/spawn.py | 22 ++++++++-------------- - 2 files changed, 9 insertions(+), 15 deletions(-) - -Index: joblib-1.4.2/joblib/externals/loky/backend/popen_loky_posix.py -=================================================================== ---- joblib-1.4.2.orig/joblib/externals/loky/backend/popen_loky_posix.py -+++ joblib-1.4.2/joblib/externals/loky/backend/popen_loky_posix.py -@@ -120,7 +120,7 @@ class Popen: - reduction._mk_inheritable(tracker_fd) - self._fds += [child_r, child_w, tracker_fd] - if sys.version_info >= (3, 8) and os.name == "posix": -- mp_tracker_fd = prep_data["mp_tracker_args"]["fd"] -+ mp_tracker_fd = prep_data["mp_tracker_fd"] - self.duplicate_for_child(mp_tracker_fd) - - from .fork_exec import fork_exec -Index: joblib-1.4.2/joblib/externals/loky/backend/spawn.py -=================================================================== ---- joblib-1.4.2.orig/joblib/externals/loky/backend/spawn.py -+++ joblib-1.4.2/joblib/externals/loky/backend/spawn.py -@@ -82,11 +82,10 @@ def get_preparation_data(name, init_main - from .resource_tracker import _resource_tracker - - _resource_tracker.ensure_running() -- d["tracker_args"] = {"pid": _resource_tracker._pid} - if sys.platform == "win32": -- d["tracker_args"]["fh"] = msvcrt.get_osfhandle(_resource_tracker._fd) -+ d["tracker_fd"] = msvcrt.get_osfhandle(_resource_tracker._fd) - else: -- d["tracker_args"]["fd"] = _resource_tracker._fd -+ d["tracker_fd"] = _resource_tracker._fd - - if sys.version_info >= (3, 8) and os.name == "posix": - # joblib/loky#242: allow loky processes to retrieve the resource -@@ -105,10 +104,7 @@ def get_preparation_data(name, init_main - # process is created (othewise the child won't be able to use it if it - # is created later on) - mp_resource_tracker.ensure_running() -- d["mp_tracker_args"] = { -- "fd": mp_resource_tracker._fd, -- "pid": mp_resource_tracker._pid, -- } -+ d["mp_tracker_fd"] = mp_resource_tracker._fd - - # Figure out whether to initialise main in the subprocess as a module - # or through direct execution (or to leave it alone entirely) -@@ -172,23 +168,21 @@ def prepare(data, parent_sentinel=None): - if "orig_dir" in data: - process.ORIGINAL_DIR = data["orig_dir"] - -- if "mp_tracker_args" in data: -+ if "mp_tracker_fd" in data: - from multiprocessing.resource_tracker import ( - _resource_tracker as mp_resource_tracker, - ) - -- mp_resource_tracker._fd = data["mp_tracker_args"]["fd"] -- mp_resource_tracker._pid = data["mp_tracker_args"]["pid"] -- if "tracker_args" in data: -+ mp_resource_tracker._fd = data["mp_tracker_fd"] -+ if "tracker_fd" in data: - from .resource_tracker import _resource_tracker - -- _resource_tracker._pid = data["tracker_args"]["pid"] - if sys.platform == "win32": -- handle = data["tracker_args"]["fh"] -+ handle = data["tracker_fd"] - handle = duplicate(handle, source_process=parent_sentinel) - _resource_tracker._fd = msvcrt.open_osfhandle(handle, os.O_RDONLY) - else: -- _resource_tracker._fd = data["tracker_args"]["fd"] -+ _resource_tracker._fd = data["tracker_fd"] - - if "init_main_from_name" in data: - _fixup_main_from_name(data["init_main_from_name"]) diff --git a/numpy22.patch b/numpy22.patch deleted file mode 100644 index 13623d0..0000000 --- a/numpy22.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 1d9b65db31bfe79c42801d795ea9ebfec1123c44 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= -Date: Mon, 9 Dec 2024 17:16:23 +0100 -Subject: [PATCH] DOC Make doctest compatible with numpy 2.2 (#1632) - ---- - joblib/__init__.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/joblib/__init__.py b/joblib/__init__.py -index 54f6c8fb4..e9d4c6870 100644 ---- a/joblib/__init__.py -+++ b/joblib/__init__.py -@@ -63,7 +63,7 @@ - >>> square = mem.cache(np.square) - >>> b = square(a) # doctest: +ELLIPSIS - ______________________________________________________________________... -- [Memory] Calling square... -+ [Memory] Calling ...square... - square(array([[0., 0., 1.], - [1., 1., 1.], - [4., 2., 1.]])) diff --git a/python-joblib.changes b/python-joblib.changes index fc1b6d2..037debc 100644 --- a/python-joblib.changes +++ b/python-joblib.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Fri Jun 20 11:06:38 UTC 2025 - Markéta Machová + +- Update to 1.5.1 + * Vendor loky3.5.5 fixing the resource_tracker clean up with earlier + Python versions + * Enforce age_limit is a positive timedelta for Memory.reduce_size, + to avoid silently ignoring it + * Remove deprecated bytes_limit argument for Memory, which should be + passed directly to Memory.reduce_size + * Drop support for Python 3.8 + * Support for Python 3.13 free-threaded has been added + * Fix a regression in 1.3 and 1.4 that caused large big endian arrays + to trigger a serialization error + * Fix support for python 3.14 in hashing, with the addition of an + extra argument in Pickler._batch_setitems + * Use pickle protocol 5 for pickling numpy arrays with object type +- Drop merged numpy22.patch and loky_resource_tracker.patch +- BuildRequire python-pytest-asyncio to fix tests with pytest 8.4 + ------------------------------------------------------------------- Thu Apr 17 10:59:17 UTC 2025 - Markéta Machová diff --git a/python-joblib.spec b/python-joblib.spec index bd8cf22..60c870c 100644 --- a/python-joblib.spec +++ b/python-joblib.spec @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-joblib -Version: 1.4.2 +Version: 1.5.1 Release: 0 Summary: Module for using Python functions as pipeline jobs License: BSD-3-Clause @@ -27,15 +27,12 @@ Source: https://files.pythonhosted.org/packages/source/j/joblib/joblib-% # PATCH-FIX-OPENSUSE Also avoid a DeprecationWarning when using fork() under # multiprocessing Patch1: also-filter-new-fork-warning.patch -# PATCH-FIX-UPSTREAM https://github.com/joblib/joblib/pull/1632 DOC Make doctest compatible with numpy 2.2 -Patch2: numpy22.patch -# PATCH-FIX-UPSTREAM https://github.com/joblib/loky/pull/450 FIX remove link to resource_tracker._pid in child processes -Patch3: loky_resource_tracker.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module lz4} BuildRequires: %{python_module numpy} BuildRequires: %{python_module pip} BuildRequires: %{python_module psutil} +BuildRequires: %{python_module pytest-asyncio} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module threadpoolctl}