From aabcb18c7eaeeab67b1ea2788403eebe99d4ba36 Mon Sep 17 00:00:00 2001 From: zhang-liang-pengkun Date: Fri, 29 Dec 2023 15:35:56 +0800 Subject: [PATCH] Fixed tests hanging on PyPy Signed-off-by: zhang-liang-pengkun --- 0005-Fixed-tests-hanging-on-PyPy.patch | 32 ++++++++++++++++++++++++++ python-futures.spec | 6 ++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 0005-Fixed-tests-hanging-on-PyPy.patch diff --git a/0005-Fixed-tests-hanging-on-PyPy.patch b/0005-Fixed-tests-hanging-on-PyPy.patch new file mode 100644 index 0000000..35c2492 --- /dev/null +++ b/0005-Fixed-tests-hanging-on-PyPy.patch @@ -0,0 +1,32 @@ +From 718654e8142d229655d7322dbc2ede8855270e58 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= +Date: Wed, 29 Nov 2017 23:06:58 +0200 +Subject: [PATCH] Fixed tests hanging on PyPy + +--- + test_futures.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/test_futures.py b/test_futures.py +index 95a3ca2..d5b3499 100644 +--- a/test_futures.py ++++ b/test_futures.py +@@ -236,6 +236,7 @@ class ThreadPoolShutdownTest(ThreadPoolMixin, ExecutorShutdownTest): + executor.map(abs, range(-5, 5)) + threads = executor._threads + del executor ++ gc.collect() + + for t in threads: + self.assertRegexpMatches(t.name, r'^SpecialPool_[0-4]$') +@@ -246,6 +247,7 @@ class ThreadPoolShutdownTest(ThreadPoolMixin, ExecutorShutdownTest): + executor.map(abs, range(-5, 5)) + threads = executor._threads + del executor ++ gc.collect() + + for t in threads: + # Ensure that our default name is reasonably sane and unique when +-- +2.39.0.windows.2 + diff --git a/python-futures.spec b/python-futures.spec index e82b92b..89ead7c 100644 --- a/python-futures.spec +++ b/python-futures.spec @@ -1,6 +1,6 @@ Name: python-futures Version: 3.1.1 -Release: 9 +Release: 10 Summary: Backport of the concurrent.futures standard library module to Python 3.2 License: Python URL: https://github.com/agronholm/pythonfutures @@ -9,6 +9,7 @@ Patch01: 0001-Backport-thread_name_prefix-from-upstream-64.patch Patch02: 0002-Specify-python_requires-to-prevent-installation-on-P.patch Patch03: 0003-Backport-fixes-to-as_completed-and-map-iterators-bpo.patch Patch04: 0004-Make-Future.__repr__-subclass-friendly-bpo-22033-65.patch +Patch05: 0005-Fixed-tests-hanging-on-PyPy.patch BuildRequires: python2-devel BuildArch: noarch @@ -43,6 +44,9 @@ The concurrent.futures module provides a high-level interface for asynchronously %{python2_sitelib}/futures-*.egg-info* %changelog +* Fri Dec 29 2023 zhangliangpengkun - 3.1.1-10 +- Fixed tests hanging on PyPy + * Wed Dec 27 2023 zhangliangpengkun - 3.1.1-9 - Make Future.__repr__ subclass-friendly (bpo-22033) (#65) -- Gitee