[Linux-SIG] PEP 538: Coercing the legacy C locale to C.UTF-8

Robert Collins robertc at robertcollins.net
Wed Jan 4 13:08:06 EST 2017


One thing: is the warning on stderr really needed? It's pretty poor form
for the VM to communicate with the user except in extraordinary
circumstances like exception handler of last resort.

We have verbose mode, and warning on that would make sense to me.

Rob

On 3 Jan 2017 7:00 PM, "Nick Coghlan" <ncoghlan at gmail.com> wrote:

> Hi folks,
>
> I have a new PEP up for a change I originally suggested as a downstream
> patch for Fedora (now that we ship a C.UTF-8 locale by default):
> https://www.python.org/dev/peps/pep-0538/
>
> I won't post the whole thing here (since a lot of it is background on the
> C locale system in general, as well as various things we've tried in the
> past), and instead will just summarise the specific technical changes I'm
> proposing:
>
> * in Py_Initialize, emit a warning on stderr regarding limited Unicode
> compatibility if we detect that LC_CTYPE is set to the "C" locale
> * in Programs/python.c (i.e. the C level main() implementation), set LANG
> and LC_ALL in the environment to "C.UTF-8" if we detect that the locale is
> otherwise set to "C"
> * skip the coercion if PYTHONALLOWCLOCALE is set so developers running in
> recent system Python versions with this implemented can still debug
> problems that only show up in older Python 3.x releases, or in embedding
> applications that still use the C locale
> * grant a priori permission to redistributors to backport this to older
> versions (as we'd like to include the change in the Fedora system Python
> for F26, which will be based on Python 3.6.0)
>
> I'm posting it here to ask if anyone sees potential deal-breakers for
> other non-Fedora-derived distros before I post it to python-dev for review.
>
> Cheers,
> Nick.
>
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
>
> _______________________________________________
> Linux-sig mailing list
> Linux-sig at python.org
> https://mail.python.org/mailman/listinfo/linux-sig
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/linux-sig/attachments/20170105/0b2b7558/attachment.html>


More information about the Linux-sig mailing list