Compare commits
4 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 3e8aa170e7 | |||
| 5174c7e853 | |||
| 475b64917b | |||
| 500c31ac66 |
49
py314.patch
49
py314.patch
@@ -1,49 +0,0 @@
|
|||||||
From 42d34719f01229b25d2725cb56e7a527a3ec35cc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Karolina Surma <ksurma@redhat.com>
|
|
||||||
Date: Wed, 12 Mar 2025 14:46:09 +0100
|
|
||||||
Subject: [PATCH] Avoid the multiprocessing forkserver method
|
|
||||||
|
|
||||||
From Python 3.14 on, the default method of spawning processes on
|
|
||||||
non-macOS POSIX systems has been changed from fork to forkserver.
|
|
||||||
Ensure the correct method is used in the test.
|
|
||||||
---
|
|
||||||
tests/test_multiprocessing.py | 14 ++++++++++++--
|
|
||||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/test_multiprocessing.py b/tests/test_multiprocessing.py
|
|
||||||
index 44a891b..01a5a0c 100644
|
|
||||||
--- a/tests/test_multiprocessing.py
|
|
||||||
+++ b/tests/test_multiprocessing.py
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
import unittest
|
|
||||||
try:
|
|
||||||
- from multiprocessing import Process, Queue, Pipe
|
|
||||||
+ from multiprocessing import Process, Queue, Pipe, get_start_method, get_context
|
|
||||||
disabled = False
|
|
||||||
except ImportError:
|
|
||||||
Process = None
|
|
||||||
@@ -14,6 +14,16 @@
|
|
||||||
class TestIni(unittest.TestCase):
|
|
||||||
"""Test sending INIConfig objects."""
|
|
||||||
|
|
||||||
+ # Since Python 3.14 on non-macOS POSIX systems
|
|
||||||
+ # the default method has been changed to forkserver.
|
|
||||||
+ # The code in this module does not work with it,
|
|
||||||
+ # hence the explicit change to 'fork'
|
|
||||||
+ # See https://github.com/python/cpython/issues/125714
|
|
||||||
+ if get_start_method() == "forkserver":
|
|
||||||
+ _mp_context = get_context(method="fork")
|
|
||||||
+ else:
|
|
||||||
+ _mp_context = get_context()
|
|
||||||
+
|
|
||||||
def test_queue(self):
|
|
||||||
def getxy(_q, _w):
|
|
||||||
_cfg = _q.get_nowait()
|
|
||||||
@@ -23,6 +33,6 @@ def getxy(_q, _w):
|
|
||||||
q = Queue()
|
|
||||||
w = Queue()
|
|
||||||
q.put(cfg)
|
|
||||||
- p = Process(target=getxy, args=(q, w))
|
|
||||||
+ p = self._mp_context.Process(target=getxy, args=(q, w))
|
|
||||||
p.start()
|
|
||||||
self.assertEqual(w.get(timeout=1), '42')
|
|
||||||
@@ -1,8 +1,3 @@
|
|||||||
-------------------------------------------------------------------
|
|
||||||
Mon Sep 8 03:58:35 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
|
||||||
|
|
||||||
- Add py314.patch to fix tests with Python 3.14
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Aug 28 06:23:41 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
Wed Aug 28 06:23:41 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-iniparse
|
# spec file for package python-iniparse
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC and contributors
|
# Copyright (c) 2024 SUSE LLC
|
||||||
# Copyright (c) 2017 Neal Gompa <ngompa13@gmail.com>.
|
# Copyright (c) 2017 Neal Gompa <ngompa13@gmail.com>.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
@@ -37,8 +37,6 @@ Patch3: python311-compat.patch
|
|||||||
Patch4: python3117.patch
|
Patch4: python3117.patch
|
||||||
# PATCH-FIX-UPSTREAM Based on gh#candlepin/python-iniparse#32
|
# PATCH-FIX-UPSTREAM Based on gh#candlepin/python-iniparse#32
|
||||||
Patch5: use-load-tests.patch
|
Patch5: use-load-tests.patch
|
||||||
# PATCH-FIX-UPSTREAM https://github.com/candlepin/python-iniparse/commit/42d34719f01229b25d2725cb56e7a527a3ec35cc Avoid the multiprocessing forkserver method
|
|
||||||
Patch6: py314.patch
|
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module testsuite}
|
BuildRequires: %{python_module testsuite}
|
||||||
|
|||||||
Reference in New Issue
Block a user