◐ Shell
clean mode source ↗

Message 57154 - Python tracker

> Updates:
> * Added class BytesWarning(Warning)
> * Added -b/-bb command line args and Py_BytesWarningFlag
> * issue PyErr_WarnEx(PyExc_BytesWarning) when Py_BytesWarningFlag is set.
> * Added warning filter for BytesWarning that raises an exception if
> Py_BytesWarningFlag > 1
>
> Open questions:
> * the warning filter isn't set when the initializer cannot load the
> warning module (e.g. frozen apps). W/o the warning module Python is
> screwed anyway and frozen apps would never add the -b argument.
> * the warnings are only enabled with -b. They can't be enabled by
> modifying the warnings.filters. Is this fine with you?

Yes, this is is all fine with me. Feel free to submit overnight.