MAINT: remove pytest.warns(None) warnings in pytest 7#1264
MAINT: remove pytest.warns(None) warnings in pytest 7#1264ogrisel merged 5 commits intojoblib:masterfrom
Conversation
Codecov ReportBase: 94.00% // Head: 94.00% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1264 +/- ##
=======================================
Coverage 94.00% 94.00%
=======================================
Files 52 52
Lines 7294 7295 +1
=======================================
+ Hits 6857 6858 +1
Misses 437 437
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
I merged master to hope for a green CI. If this is the case, then +1 for merge on my side. |
|
There is a seemingly reproducible failure in Edit: in retrospect |
|
I think this is the bug I triggered in #588 and I fixed it there so if th CI is green, I would merge this one. |
|
Ok it does not seem a flaky one. Let's not merge this one but see if the refactoring in #588 can fix this? |
|
Maybe we need to insert with warnings.catch_warnings(record=True) as record:
warnings.simplefilter("always")
...as documented in https://docs.python.org/3/library/warnings.html#testing-warnings ? |
67b1973 to
3366d3c
Compare
|
I rebased on |
|
I can reproduce the freeze locally and use fault handler to debug: diff --git a/conftest.py b/conftest.py
index e246e95..68e58b8 100644
--- a/conftest.py
+++ b/conftest.py
@@ -51,6 +51,12 @@ def pytest_configure(config):
log = mp.util.log_to_stderr(logging.DEBUG)
log.handlers[0].setFormatter(logging.Formatter(
'[%(levelname)s:%(processName)s:%(threadName)s] %(message)s'))
+ import faulthandler
+ import signal, os
+ faulthandler.register(signal.SIGUSR1)
+ print(
+ f"Installed faulthandler, trigger with: kill -{signal.SIGUSR1} {os.getpid()}"
+ )
def pytest_unconfigure(config):Need to launch pytest without stdout/stderr capture ( |
|
So the executor manager thread of a nested This might be a race-condition in Edit: this is wrong, the executor manager thread does not come from why would we have a threadpool worker in the main process? |
|
Note that I after I terminated my process with control C, I got the following output that did show up in my terminal 5 min later (the process was probably zombified in the background): |
|
Ok I added a so it seems related to dask... |
|
This thread is indeed related to dask. If I uninstall |
9121399 to
d54d1be
Compare
try to see if we can use
pytest7by removingwarns(None).