Nick Coghlan <ncogh...@gmail.com> added the comment:

I still think the current Python 3.7 behaviour makes the CPython runtime a 
badly behaved C library, since we may end up changing the active libc locale 
even when it isn't the main application, and a change hasn't been explicitly 
requested by the embedding app.

However, the only way to encounter that misbehaviour is to be running a 
Unicode-unfriendly embedding application that leaves the C locale in place on a 
Unicode-unfriendly operating system that doesn't set a more sensible locale in 
the first place.

I've also gone through a few iterations on 
https://github.com/python/cpython/pull/9257 now, and respecting the -E and -I 
options *without* deferring locale coercion until the same point where UTF-8 
mode is checked for turns out to require duplication of an irritatingly large 
amount of argument processing code (as even if all you're checking for is two 
options that don't take arguments, you still need to correctly skip over all 
the other permitted arguments, stop at the arguments that terminate the python 
option list, and find the options of interest even when they're in a combined 
option string like "-vI").

Accordingly, I no longer think it's worth pursuing this change purely to 
assuage my sense of responsibility to developers of applications embedding the 
Python runtime - instead, we can leave the Python 3.7.0 solution in place for 
3.8 as well, until such time as we have embedding application authors actually 
reporting bug reports against the Python 3.7 behaviour.

To be completely honest, I expect the odds of that actually happening in 
practice to be incredibly low, and even if it does happen, our answer may well 
be to point to the in-development multi-phase configuration API rather than 
allowing it to be disabled when using Py_Initialize() and/or Py_Main().

----------
resolution:  -> postponed
stage: patch review -> resolved
status: open -> closed
type:  -> behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34589>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to