From 6e504808b7c1e8536c6e006d5d636fe596864c7b Mon Sep 17 00:00:00 2001 From: "Yves.Duprat" Date: Mon, 10 Aug 2026 20:03:41 +0200 Subject: [PATCH 1/3] Initial commit - Fix the calculation of the HAVE_GETVALUE constant - Enabled the second part of ``test_bounded_semphore`` --- Lib/test/_test_multiprocessing.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index 36e0880bc088189..2b73156b203da65 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -138,8 +138,11 @@ def _resource_unlink(name, rtype): WAIT_ACTIVE_CHILDREN_TIMEOUT = 5.0 -HAVE_GETVALUE = not getattr(_multiprocessing, - 'HAVE_BROKEN_SEM_GETVALUE', False) +try: + HAVE_GETVALUE = not getattr(_multiprocessing,'flags') \ + .get('HAVE_BROKEN_SEM_GETVALUE', False) +except: + HAVE_GETVALUE = True WIN32 = (sys.platform == "win32") @@ -1752,9 +1755,9 @@ def test_bounded_semaphore(self): sem = self.BoundedSemaphore(2) self._test_semaphore(sem) # Currently fails on OS/X - #if HAVE_GETVALUE: - # self.assertRaises(ValueError, sem.release) - # self.assertReturnsIfImplemented(2, get_value, sem) + if HAVE_GETVALUE: + self.assertRaises(ValueError, sem.release) + self.assertReturnsIfImplemented(2, get_value, sem) def test_timeout(self): if self.TYPE != 'processes': From 6ee814c1ee1d319f289a8344b7f86485f549bf66 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Tue, 11 Aug 2026 20:46:11 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Tests/2026-08-11-20-46-03.gh-issue-155445.iEVmED.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Tests/2026-08-11-20-46-03.gh-issue-155445.iEVmED.rst diff --git a/Misc/NEWS.d/next/Tests/2026-08-11-20-46-03.gh-issue-155445.iEVmED.rst b/Misc/NEWS.d/next/Tests/2026-08-11-20-46-03.gh-issue-155445.iEVmED.rst new file mode 100644 index 000000000000000..4f49e477e06b6a1 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2026-08-11-20-46-03.gh-issue-155445.iEVmED.rst @@ -0,0 +1 @@ +Fix the calculation of constant HAVE_GETVALUE in `test._test_multiprocessing.py` file. From e6d67f552a5161dae7397d8212d7b3cee81db953 Mon Sep 17 00:00:00 2001 From: Duprat Date: Wed, 12 Aug 2026 10:15:17 +0200 Subject: [PATCH 3/3] Fix nits in news --- .../next/Tests/2026-08-11-20-46-03.gh-issue-155445.iEVmED.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Tests/2026-08-11-20-46-03.gh-issue-155445.iEVmED.rst b/Misc/NEWS.d/next/Tests/2026-08-11-20-46-03.gh-issue-155445.iEVmED.rst index 4f49e477e06b6a1..5828343409f0cf7 100644 --- a/Misc/NEWS.d/next/Tests/2026-08-11-20-46-03.gh-issue-155445.iEVmED.rst +++ b/Misc/NEWS.d/next/Tests/2026-08-11-20-46-03.gh-issue-155445.iEVmED.rst @@ -1 +1 @@ -Fix the calculation of constant HAVE_GETVALUE in `test._test_multiprocessing.py` file. +Fix the calculation of constant HAVE_GETVALUE in ``test._test_multiprocessing.py`` test file.