[med-svn] [Git][med-team/ariba][master] add patch to make code work with Python 3.14's multiprocessing
Sascha Steinbiss (@satta)
gitlab at salsa.debian.org
Sun Jul 5 22:19:59 BST 2026
Sascha Steinbiss pushed to branch master at Debian Med / ariba
Commits:
c1cd888f by Sascha Steinbiss at 2026-07-05T23:19:23+02:00
add patch to make code work with Python 3.14's multiprocessing
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/multiprocessing-py3.14.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+ariba (2.14.7+ds-13) unstable; urgency=medium
+
+ * Add patch to make code compatible with Python 3.14's multiprocessing.
+ (Closes: #1141163)
+
+ -- Sascha Steinbiss <satta at debian.org> Sun, 05 Jul 2026 23:10:35 +0200
+
ariba (2.14.7+ds-12) unstable; urgency=medium
* Team Upload
=====================================
debian/patches/multiprocessing-py3.14.patch
=====================================
@@ -0,0 +1,28 @@
+Description: adapt to new multiprocessing code
+ Adapts the code to Python 3.14's change from fork to forkserver as the default
+ multiprocessing start method, which causes ConnectionResetError when using
+ multiprocessing.Manager() in certain environments (chroots, containers).
+Author: Sascha Steinbiss <satta at debian.org>
+Last-Update: 2026-07-05
+--- a/ariba/clusters.py
++++ b/ariba/clusters.py
+@@ -462,14 +462,17 @@
+ # memory, and thus bypass the NFS issues. The counter is accesses infrequently
+ # relative to computations, so the performance does not suffer.
+ # default authkey in the manager will be some generated random-looking string
+- manager = multiprocessing.Manager()
++ # Use 'fork' context explicitly to avoid Python 3.14's default 'forkserver' which
++ # can cause ConnectionResetError in certain environments (e.g., chroot, containers)
++ ctx = multiprocessing.get_context('fork')
++ manager = ctx.Manager()
+ remaining_clusters = manager.Value('l',len(cluster_list))
+ # manager.Value does not provide access to the internal RLock that we need for
+ # implementing atomic -=, so we need to carry around a separate RLock object.
+ remaining_clusters_lock = manager.RLock()
+ try:
+ if self.threads > 1:
+- self.pool = multiprocessing.Pool(self.threads)
++ self.pool = ctx.Pool(self.threads)
+ cluster_list = self.pool.starmap(_run_cluster, zip(cluster_list, itertools.repeat(self.verbose), itertools.repeat(self.clean), itertools.repeat(self.fails_dir),
+ itertools.repeat(remaining_clusters),itertools.repeat(remaining_clusters_lock)))
+ # harvest the pool as soon as we no longer need it
=====================================
debian/patches/series
=====================================
@@ -8,3 +8,4 @@ python3.12.patch
python3.12_syntax_warning.patch
py3.13.patch
remove_pkg_resources.patch
+multiprocessing-py3.14.patch
View it on GitLab: https://salsa.debian.org/med-team/ariba/-/commit/c1cd888fa41688916f1765604119c78912f6b3e9
--
View it on GitLab: https://salsa.debian.org/med-team/ariba/-/commit/c1cd888fa41688916f1765604119c78912f6b3e9
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260705/df2fe929/attachment-0001.htm>
More information about the debian-med-commit
mailing list