Nick Coghlan added the comment:

I've now written this up as a PEP: 
https://github.com/python/peps/blob/master/pep-0538.txt

The latest attached patch implements the specific design proposed in the PEP. 
Relative to the last Fedora specific patch, this tweaks the warning message 
wording slightly, and only emits the library level warning when 
PYTHONALLOWCLOCALE is set:

======================
$ LANG=C ./python -c "import sys; print(sys.getfilesystemencoding())"
Python detected LC_CTYPE=C, forcing LC_ALL & LANG to C.UTF-8 (set 
PYTHONALLOWCLOCALE to disable this locale coercion behaviour).
utf-8


======================
$ PYTHONALLOWCLOCALE=1 LANG=C ./python -c "import sys; 
print(sys.getfilesystemencoding())"
Py_Initialize detected LC_CTYPE=C, which limits Unicode compatibility. Some 
libraries and operating system interfaces may not work correctly. Set 
`PYTHONALLOWCLOCALE=1 LC_CTYPE=C` to configure a similar environment when 
running Python directly.
ascii

----------
Added file: http://bugs.python.org/file46059/pep538_coerce_legacy_c_locale.diff

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

Reply via email to