pycompat: ignore the fork + thread warning for now stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 25 Oct 2024 00:46:22 +0200
branchstable
changeset 52120 49aeeda97c14
parent 52119 5ad5f0853a0a
child 52121 05bb54a3ef26
pycompat: ignore the fork + thread warning for now No known issues has been reported and this is breaking the CI quite hard. So for now we have to delay the issue.
mercurial/worker.py
--- a/mercurial/worker.py	Thu Oct 24 22:55:45 2024 -0400
+++ b/mercurial/worker.py	Fri Oct 25 00:46:22 2024 +0200
@@ -13,6 +13,7 @@
 import sys
 import threading
 import time
+import warnings
 
 from .i18n import _
 from . import (
@@ -22,6 +23,18 @@
     scmutil,
 )
 
+# XXX TODO: We should seriously look into this fork + thread issues, however
+# this is wreaking havoc in the tests suites, so silencing for now.
+warnings.filterwarnings(
+    'ignore',
+    message=(
+        r'This process \(pid=\d+\) is multi-threaded,'
+        r' use of fork\(\) may lead to deadlocks in the child.'
+    ),
+    category=DeprecationWarning,
+    module='mercurial.worker',
+)
+
 
 def countcpus():
     '''try to count the number of CPUs on the system'''