mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-36882 Fix debugger not working properly with joblib.Parallel when using loky backend
GitOrigin-RevId: 392e04e2e10ae404caf8c561a7c951e7eaea3c9c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4825ffe8e2
commit
1199e0bdaa
@@ -291,6 +291,8 @@ class ReaderThread(PyDBDaemonThread):
|
||||
while not self.killReceived:
|
||||
try:
|
||||
r = self.sock.recv(1024)
|
||||
except OSError:
|
||||
return
|
||||
except:
|
||||
if not self.killReceived:
|
||||
traceback.print_exc()
|
||||
|
||||
@@ -178,8 +178,8 @@ envs {
|
||||
|
||||
createPython("python3.11",
|
||||
python311version,
|
||||
["black == 23.1.0"],
|
||||
"python3.11\nblack",
|
||||
["black == 23.1.0", "joblib"],
|
||||
"python3.11\nblack\njoblib",
|
||||
true)
|
||||
|
||||
createPython("python3.12",
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
from joblib import Parallel, delayed
|
||||
|
||||
|
||||
def f(i):
|
||||
print(i)
|
||||
return i*i
|
||||
|
||||
Parallel(n_jobs=2, backend='loky')(delayed(f)(i) for i in range(3))
|
||||
+28
@@ -340,4 +340,32 @@ public class PythonDebuggerMultiprocessingTest extends PyEnvTestCase {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestFor(issues = "PY-36882")
|
||||
public void testNoErrorMessagesWithJoblib() {
|
||||
runPythonTest(new PyDebuggerMultiprocessTask("/debug", "test_joblib.py") {
|
||||
@Override
|
||||
public void before() {
|
||||
toggleBreakpoint(4);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testing() throws Exception {
|
||||
waitForPause();
|
||||
resume();
|
||||
waitForPause();
|
||||
resume();
|
||||
waitForPause();
|
||||
resume();
|
||||
waitForTerminate();
|
||||
assertFalse(output().contains("Traceback"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Set<String> getTags() {
|
||||
return Collections.singleton("joblib");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user