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 dholth
Recipients dholth
Date 2013-07-05.22:58:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373065124.82.0.249288626652.issue18373@psf.upfronthosting.co.za>
In-reply-to
Content
This patch lets the user get/set the byteswarningflag() to control whether warnings are emitted at runtime (pursuant to the configuration of the warnings module, of course).

The idea is that a user who is concerned with interacting with bytes correctly would use a context manager to set str(bytes) to raise exceptions during a critical serialization.

TODO the hypothetical context manager would also have to push/pop the warnings state to work correctly. Maybe str(bytes) can raise a regular exception if byteswarningflag() is high enough?

TODO don't know if this plays nicely when there are no threads
History
Date User Action Args
2013-07-05 22:58:44dholthsetrecipients: + dholth
2013-07-05 22:58:44dholthsetmessageid: <1373065124.82.0.249288626652.issue18373@psf.upfronthosting.co.za>
2013-07-05 22:58:44dholthlinkissue18373 messages
2013-07-05 22:58:44dholthcreate