[issue28403] Migration RFE: optional warning for implicit unicode conversions

2016-10-10 Thread Nick Coghlan
Nick Coghlan added the comment: The main problem with the "undefined" encoding is that it actually *fails* the application, rather than allowing it to continue, but providing a warning at each new point where it encounters implicit encoding or decoding. This means the parts of the standard lib

[issue28403] Migration RFE: optional warning for implicit unicode conversions

2016-10-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Nick, I think you've missed the "undefined" encoding that we've had for this ever since Unicode was added to Python. You put the needed code into your sitecustomize.py file and Python2 will then behave just like Python3, i.e. raise an exception instead of

[issue28403] Migration RFE: optional warning for implicit unicode conversions

2016-10-09 Thread Nick Coghlan
Nick Coghlan added the comment: (Correction to the above: the case where this came up turned out to be due to consuming code monkeypatching things when it really shouldn't have been, so it fell into the second category of "It would have been helpful to be able to more easily rule this out as a

[issue28403] Migration RFE: optional warning for implicit unicode conversions

2016-10-09 Thread Nick Coghlan
New submission from Nick Coghlan: Some of the hardest compatibility issues to track down in Python 3 migrations are those where existing code is depending on an implicit str->unicode promotion something in the depths of a support library (or sometimes even the standard library - the context wh