[New-bugs-announce] [issue34544] FreeBSD: Fatal Python error: get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed
STINNER Victor
report at bugs.python.org
Wed Aug 29 19:37:46 EDT 2018
New submission from STINNER Victor <vstinner at redhat.com>:
It seems like my recent work on Python initialization broke Python on FreeBSD. Many test_c_locale_coerce tests now fail with:
"Fatal Python error: get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed"
Example of failed buildbot build:
https://buildbot.python.org/all/#/builders/87/builds/1340
It seems like this buildbot started to fail at this build:
https://buildbot.python.org/all/#/builders/87/builds/1332
This build has been triggered by this change:
commit 177d921c8c03d30daa32994362023f777624b10d
Author: Victor Stinner <vstinner at redhat.com>
Date: Wed Aug 29 11:25:15 2018 +0200
bpo-34485, Windows: LC_CTYPE set to user preference (GH-8988)
On Windows, the LC_CTYPE is now set to the user preferred locale at
startup: _Py_SetLocaleFromEnv(LC_CTYPE) is now called during the
Python initialization. Previously, the LC_CTYPE locale was "C" at
startup, but changed when calling setlocale(LC_CTYPE, "") or
setlocale(LC_ALL, "").
pymain_read_conf() now also calls _Py_SetLocaleFromEnv(LC_CTYPE) to
behave as _Py_InitializeCore(). Moreover, it doesn't save/restore the
LC_ALL anymore.
On Windows, standard streams like sys.stdout now always use
surrogateescape error handler by default (ignore the locale).
test_c_locale_coerce tests invalid locales like LANG="invalid.ascii". It seems like Python supported such configuration before my changes.
My recent work:
* bpo-34523: filesystem encoding/errors
* bpo-34485: stdio encoding/errors
----------
components: Interpreter Core
messages: 324361
nosy: vstinner
priority: normal
severity: normal
status: open
title: FreeBSD: Fatal Python error: get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34544>
_______________________________________
More information about the New-bugs-announce
mailing list