This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients ncoghlan, ned.deily, vstinner
Date 2018-09-13.14:15:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The actual functional error is that the following will currently give different outputs on Fedora and CentOS 7, whereas in the original PEP 538 implementation it would always print "C", even if locale coercion would otherwise normally work on your current platform:

    LC_CTYPE=C PYTHONCOERCECLOCALE=0 python3 -E -c 'import os; print(os.env["LC_CTYPE"])'

As per the comment that was deleted in, that was an intentional behaviour to allow developers testing scripts that are invoked using -E and -I to pretend that their local C.UTF-8 locale didn't exist when trying to reproducing behaviour otherwise seen only when locale coercion fails due to the lack of a suitable coercion target.

I'm working on an alternate PR that restores that aspect of the original behaviour, while preserving all the other improvements you made (such as ensuring that emitting the warning gets delayed until after the C level stderr is properly initialised)
Date User Action Args
2018-09-13 14:15:32ncoghlansetrecipients: + ncoghlan, vstinner, ned.deily
2018-09-13 14:15:32ncoghlansetmessageid: <>
2018-09-13 14:15:32ncoghlanlinkissue34589 messages
2018-09-13 14:15:32ncoghlancreate