New submission from STINNER Victor <vstin...@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 <vstin...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue34544> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com