On 2 June 2017 at 18:46, Nick Coghlan <ncogh...@redhat.com> wrote:
> On Fri, Jun 2, 2017 at 1:15 PM, Zbigniew Jędrzejewski-Szmek
> <zbys...@in.waw.pl> wrote:
>> It seems that right solution, that would work while the builders are
>> still not F26, would be to configure their locale to C.UTF-8. It'd
>> just be a matter of dropping LANG=C.UTF-8 into /etc/locale.conf.
>> I think a ticket on https://pagure.io/fedora-infrastructure would be
>> the way to request the change.
>
> While this seems like the right next step to me, if it isn't feasible
> for some reason, we may need to reconsider emitting the warning at the
> Python level, and instead just silently change LC_CTYPE to the more
> sensible setting.

A follow-up on this: I just made the change upstream to turn these
warnings off by default, and add a "PYTHONCOERCECLOCALE=warn" runtime
flag to let folks opt in to the warnings as a tool for debugging
potential locale coercion and locale compatibility problems. We were
simply getting far too many false positives where code that was
previously working fine (because it was genuinely only needing to
handle 7-bit ASCII inputs and outputs) was failing solely due to the
new warnings, not because anything was actually broken.

There are also some significant improvements to the test suite to make
sure that it's properly covering the expected behaviour when there
*aren't* any coercion target locales available. While that's not
applicable to Fedora directly, it *will* apply to any future Python
3.6 SCL, as well as to any python36 packages put together for EPEL.

Tracker issue: https://bugs.python.org/issue30565
Squashed commit:
https://github.com/python/cpython/commit/eb81795d7d3a8c898fa89a376d63fc3bbfb9a081

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org

Reply via email to