]> granicus.if.org Git - python/commit
bpo-36763: Fix _PyRuntime.preconfig.coerce_c_locale (GH-13444)
authorVictor Stinner <vstinner@redhat.com>
Mon, 20 May 2019 15:16:38 +0000 (17:16 +0200)
committerGitHub <noreply@github.com>
Mon, 20 May 2019 15:16:38 +0000 (17:16 +0200)
commit0f72147ce2b3d65235b41eddc6a57be40237b5c7
treeffab92ed1baf4ff593145661b513e18cc7c8bb88
parent522ccef8690970fc4f78f51a3adb995f2547871a
bpo-36763: Fix _PyRuntime.preconfig.coerce_c_locale (GH-13444)

_PyRuntime.preconfig.coerce_c_locale can now be used to
check if the C locale has been coerced.

* Fix _Py_LegacyLocaleDetected(): don't attempt to coerce the
  C locale if LC_ALL environment variable is set. Add 'warn'
  parameter: emit_stderr_warning_for_legacy_locale() must not
  the LC_ALL env var.
* _PyPreConfig_Write() sets coerce_c_locale to 0 if
  _Py_CoerceLegacyLocale() fails.
Include/cpython/pylifecycle.h
Python/preconfig.c
Python/pylifecycle.c