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 Segev Finer
Recipients Gerrit.Holl, Segev Finer, erik.bray, pitrou, serhiy.storchaka
Date 2018-07-10.11:00:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1531220459.77.0.56676864532.issue29672@psf.upfronthosting.co.za>
In-reply-to
Content
Hmm, I originally missed the per module __warningregistry__... Need to read the code more closely...

What should the behavior be? We can add a flag that will make all warning actions be "always" when catch_warnings is in effect. But that doesn't feel right with the way catch_warnings currently behaves or what is expected of it.

Another idea would be to add a callback that is called whenever we set a module registry, allowing catch_warnings to backup the original registry of each module and restore them all on exit (Also the _onceregistry and _filters_version).
History
Date User Action Args
2018-07-10 11:00:59Segev Finersetrecipients: + Segev Finer, pitrou, Gerrit.Holl, erik.bray, serhiy.storchaka
2018-07-10 11:00:59Segev Finersetmessageid: <1531220459.77.0.56676864532.issue29672@psf.upfronthosting.co.za>
2018-07-10 11:00:59Segev Finerlinkissue29672 messages
2018-07-10 11:00:59Segev Finercreate