Message201861
warn_shutdown.py does not emit warnings because the thread states are destroyed too late, when the modules have been destroyed.
I opened a new issue #19466 "Clear state of threads earlier in Python shutdown" which would permit to emit properly warnings, at least for the specific case of warn_shutdown.py.
> The changeset 1787277915e9 is closer to a workaround than a real fix: ...
If the module is None, it's too late: modules have been destroyed, so it's safer to not call warn_explicit() and do nothing.
I tested to fail with an assertion error if a warning is emitted too late (ie. when module is None). test_threading.test_4_daemon_threads() does fail in this case. Using the patch attached to #19466, the full test suite pass correctly. |
|
Date |
User |
Action |
Args |
2013-10-31 23:53:46 | vstinner | set | recipients:
+ vstinner, Arfrever, python-dev |
2013-10-31 23:53:46 | vstinner | set | messageid: <1383263626.14.0.260478702594.issue19442@psf.upfronthosting.co.za> |
2013-10-31 23:53:46 | vstinner | link | issue19442 messages |
2013-10-31 23:53:46 | vstinner | create | |
|