Author ncoghlan
Recipients ncoghlan, ned.deily, vstinner
Date 2018-09-13.14:15:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1536848132.84.0.956365154283.issue34589@psf.upfronthosting.co.za>
In-reply-to
Content
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 https://github.com/python/cpython/commit/9454060e84a669dde63824d9e2fcaf295e34f687#diff-8c018c3ada66d06c8e101e47a313c2c7, 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)
History
Date User Action Args
2018-09-13 14:15:32ncoghlansetrecipients: + ncoghlan, vstinner, ned.deily
2018-09-13 14:15:32ncoghlansetmessageid: <1536848132.84.0.956365154283.issue34589@psf.upfronthosting.co.za>
2018-09-13 14:15:32ncoghlanlinkissue34589 messages
2018-09-13 14:15:32ncoghlancreate