public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-zict] f44: Backport fix for test_stress_different_keys_threadsafe hang
Date: Sat, 06 Jun 2026 22:59:12 GMT	[thread overview]
Message-ID: <178078675249.1.15900845447499679672.rpms-python-zict-0e60f9071787@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/python-zict
Branch : f44
Commit : 0e60f9071787d8463754a5532745eb0265171763
Author : Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date   : 2026-06-06T18:58:22-04:00
Stats  : +28/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-zict/c/0e60f9071787d8463754a5532745eb0265171763?branch=f44

Log:
Backport fix for test_stress_different_keys_threadsafe hang

---
diff --git a/108.patch b/108.patch
new file mode 100644
index 0000000..b98c58c
--- /dev/null
+++ b/108.patch
@@ -0,0 +1,24 @@
+From 17a36dc68964c0f91c2d0fc0e7b8c6dc686251ca Mon Sep 17 00:00:00 2001
+From: crusaderky <crusaderky@gmail.com>
+Date: Tue, 5 Sep 2023 16:04:24 +0100
+Subject: [PATCH] Prevent test timeout on a single CPU
+
+---
+ zict/tests/utils_test.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/zict/tests/utils_test.py b/zict/tests/utils_test.py
+index 0640e2b..e5693d1 100644
+--- a/zict/tests/utils_test.py
++++ b/zict/tests/utils_test.py
+@@ -169,7 +169,9 @@ def check_different_keys_threadsafe(
+ 
+     def worker(idx, key, value):
+         barrier.wait()
+-        while any(c < 10 for c in counters):
++        # When running on a single CPU (`taskset -c 0 pytest`), multitasking can
++        # misbehave and almost completely starve one of the two threads
++        while any(c < 10 for c in counters) and all(c < 1000 for c in counters):
+             z[key] = value
+             try:
+                 assert z[key] == value

diff --git a/python-zict.spec b/python-zict.spec
index 5def96b..835bb54 100644
--- a/python-zict.spec
+++ b/python-zict.spec
@@ -7,7 +7,9 @@ Summary:        Mutable mapping tools
 
 License:        BSD-3-Clause
 URL:            https://pypi.python.org/pypi/%{srcname}
-Source0:        %pypi_source
+Source:         %pypi_source %{srcname}
+# Fix hang in test_stress_different_keys_threadsafe.
+Patch:          https://github.com/dask/zict/pull/108.patch
 
 BuildArch:      noarch
 
@@ -44,7 +46,7 @@ Summary:        %{summary}
 
 
 %prep
-%autosetup -n %{srcname}-%{version}
+%autosetup -n %{srcname}-%{version} -p1
 # drop LMDB bits till LMDB is buildable again
 rm -f zict/lmdb.py
 sed -i "/lmdb/d" zict/__init__.py

                 reply	other threads:[~2026-06-06 22:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178078675249.1.15900845447499679672.rpms-python-zict-0e60f9071787@fedoraproject.org \
    --to=quantum.analyst@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox