[issue30755] locale.normalize() and getdefaultlocale() convert C.UTF-8 to en_US.UTF-8

Gordon Messmer report at bugs.python.org
Tue Jul 9 02:10:15 EDT 2019


Gordon Messmer <gordon.messmer at gmail.com> added the comment:

> I agree we shouldn't be aliasing C.UTF-8 to en_US.UTF-8 though

What can we do about reverting that change?  Python's current behavior causes unexpected exceptions, especially in containers.

I'm currently debugging test failures in a Python application that occur in Fedora rawhide containers.  Those containers don't have any locales installed.  The test software saves its current locale, changes the locale in order to run a test, and then restores the original.  Because Python is incorrectly reporting the original locale as "en_US", restoring the original fails.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30755>
_______________________________________


More information about the Python-bugs-list mailing list