On 20Aug2016 1231, Nick Coghlan wrote:
I'd like to suggest an option that
didn't come up on python-ideas: add such a flag to Python 3.6, and
then actively seek feedback from folks using non-UTF-8 encodings
before making a decision on what to do by default in Python 3.7.

My biggest concern is that it then falls onto users to know how to start Python with that flag. About the only way I'd be okay with this is going with option #2 (using mbcs:strict, rather than mbcs:replace) and putting a note in the exception to "restart Python with the -X:utf8 option, or contact whoever gave you the application if you don't know what this means", and hope that the user gets to see the exception rather than it being swallowed by the application (and then that the user knows how to start it via python.exe, as opposed to a script entry point, a shortcut or via a browser or other launcher).

Basically, we make breaking noisier and tell the user to fix it. Some users will think that means it is their fault.

On the other hand, having code opt-in or out of the new handling requires changing code (which is presumably not going to happen, or we wouldn't consider keeping the old behaviour and/or letting the user control it), and leads to conflicts between libraries that expect different behaviour. If we expect people to use the flag (and I do), we need to be really explicit that developers should handle two cases. Without the flag, we only need to be explicit about how developers should handle the one case.

This is a really hard problem for people to reason about abstractly,
but "try running Python with this new flag, and see if anything
breaks" is a much easier question to ask and answer.

Personally I'm a big fan of doing this with beta releases. There's time to switch back to an opt-in model before the final release if things go badly. There's already been a lot of interest in the 3.6 prereleases (the 3.6.0a3 installer had over 80k downloads in its first fortnight), so I think this is viable.

To help, I could add an extra info page to the prerelease installer announcing some specific new changes and explicitly asking for feedback to bugs.p.o - the ask is already there, but we could beg more in prereleases.

Cheers,
Steve
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to