This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Arfrever, python-dev, vstinner
Date 2013-10-31.23:53:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1383263626.14.0.260478702594.issue19442@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-10-31 23:53:46vstinnersetrecipients: + vstinner, Arfrever, python-dev
2013-10-31 23:53:46vstinnersetmessageid: <1383263626.14.0.260478702594.issue19442@psf.upfronthosting.co.za>
2013-10-31 23:53:46vstinnerlinkissue19442 messages
2013-10-31 23:53:46vstinnercreate