Author christian.heimes
Recipients christian.heimes, gvanrossum
Date 2007-11-06.02:16:11
SpamBayes Score 0.0171325
Marked as misclassified No
Message-id <>
Pfff! I've written my best code after having one or two beers :)

* 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?
File name Uploaded
py3k-pep3137_str_bytes_warning2.patch christian.heimes, 2007-11-06.02:16:11
Date User Action Args
2007-11-06 02:16:12christian.heimessetspambayes_score: 0.0171325 -> 0.0171325
recipients: + christian.heimes, gvanrossum
2007-11-06 02:16:12christian.heimessetspambayes_score: 0.0171325 -> 0.0171325
messageid: <>
2007-11-06 02:16:12christian.heimeslinkissue1392 messages
2007-11-06 02:16:11christian.heimescreate