You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ResourceWarnings are often issued during garbage collection. Those reports are non local and therefore it is difficult to find the resource's origin.
Python's tracemalloc allows to keep track of allocation tracebacks and if recorded such a traceback is included in the ResourceWarning. But the report is still not associated with a particular test, and it is often not easy to properly configure tracemalloc (regarding traceback depth) to reliably obtain the information which test has caused the problem.
I propose an new option --gc-after-test. If set, gc.collect is called after each test (similar to --report-refcounts); this way, a ResourceWarning can be easily associated with the test revealing the resource problem.
Opinions?
The text was updated successfully, but these errors were encountered:
ResourceWarning
s are often issued during garbage collection. Those reports are non local and therefore it is difficult to find the resource's origin.Python's
tracemalloc
allows to keep track of allocation tracebacks and if recorded such a traceback is included in theResourceWarning
. But the report is still not associated with a particular test, and it is often not easy to properly configuretracemalloc
(regarding traceback depth) to reliably obtain the information which test has caused the problem.I propose an new option
--gc-after-test
. If set,gc.collect
is called after each test (similar to--report-refcounts
); this way, aResourceWarning
can be easily associated with the test revealing the resource problem.Opinions?
The text was updated successfully, but these errors were encountered: