summaryrefslogtreecommitdiff
path: root/Programs/_testembed.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-09-17 16:22:29 -0700
committerGitHub <noreply@github.com>2018-09-17 16:22:29 -0700
commit7a0791b6992d420dc52536257f2f093851ed7215 (patch)
treed41edd6bc79c92232213480fc853dd86530780bf /Programs/_testembed.c
parent1fa2ec49bec50bea1847b558b883c5c904334734 (diff)
downloadcpython-git-7a0791b6992d420dc52536257f2f093851ed7215.tar.gz
bpo-34589: C locale coercion off by default (GH-9073)
Py_Initialize() and Py_Main() cannot enable the C locale coercion (PEP 538) anymore: it is always disabled. It can now only be enabled by the Python program ("python3). test_embed: get_filesystem_encoding() doesn't have to set PYTHONUTF8 nor PYTHONCOERCECLOCALE, these variables are already set in the parent.
Diffstat (limited to 'Programs/_testembed.c')
-rw-r--r--Programs/_testembed.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index 12880325b2..b9394690c3 100644
--- a/Programs/_testembed.c
+++ b/Programs/_testembed.c
@@ -482,8 +482,6 @@ static int test_init_from_config(void)
putenv("PYTHONMALLOCSTATS=0");
config.malloc_stats = 1;
- /* FIXME: test _coerce_c_locale and _coerce_c_locale_warn */
-
putenv("PYTHONUTF8=0");
Py_UTF8Mode = 0;
config.utf8_mode = 1;
@@ -606,8 +604,7 @@ static int test_init_isolated(void)
/* Test _PyCoreConfig.isolated=1 */
_PyCoreConfig config = _PyCoreConfig_INIT;
- /* Set _coerce_c_locale and utf8_mode to not depend on the locale */
- config._coerce_c_locale = 0;
+ /* Set utf8_mode to not depend on the locale */
config.utf8_mode = 0;
/* Use path starting with "./" avoids a search along the PATH */
config.program_name = L"./_testembed";