Message192372
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 |
|
Date |
User |
Action |
Args |
2013-07-05 22:58:44 | dholth | set | recipients:
+ dholth |
2013-07-05 22:58:44 | dholth | set | messageid: <1373065124.82.0.249288626652.issue18373@psf.upfronthosting.co.za> |
2013-07-05 22:58:44 | dholth | link | issue18373 messages |
2013-07-05 22:58:44 | dholth | create | |
|