diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-09-19 21:56:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-19 21:56:36 (GMT) |
commit | 06e7608207daab9fb82d13ccf2d3664535442f11 (patch) | |
tree | 690da78834ebfbe2f3f0316972bfcbde97a67a8f /Programs | |
parent | 76531e2e82319a487d659bc469441bd4b8251608 (diff) | |
download | cpython-06e7608207daab9fb82d13ccf2d3664535442f11.zip cpython-06e7608207daab9fb82d13ccf2d3664535442f11.tar.gz cpython-06e7608207daab9fb82d13ccf2d3664535442f11.tar.bz2 |
Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)" (GH-9430)
* Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)"
This reverts commit dbdee0073cf0b88fe541980ace1f650900f455cc.
* Revert "bpo-34589: C locale coercion off by default (GH-9073)"
This reverts commit 7a0791b6992d420dc52536257f2f093851ed7215.
* Revert "bpo-34589: Make _PyCoreConfig.coerce_c_locale private (GH-9371)"
This reverts commit 188ebfa475a6f6aa2d0ea14ca8e1fbe7865b6d27.
Diffstat (limited to 'Programs')
-rw-r--r-- | Programs/_testembed.c | 9 | ||||
-rw-r--r-- | Programs/python.c | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Programs/_testembed.c b/Programs/_testembed.c index b939469..99772ea 100644 --- a/Programs/_testembed.c +++ b/Programs/_testembed.c @@ -330,6 +330,8 @@ dump_config(void) printf("filesystem_encoding = %s\n", config->filesystem_encoding); printf("filesystem_errors = %s\n", config->filesystem_errors); + printf("coerce_c_locale = %i\n", config->coerce_c_locale); + printf("coerce_c_locale_warn = %i\n", config->coerce_c_locale_warn); printf("utf8_mode = %i\n", config->utf8_mode); printf("pycache_prefix = %ls\n", config->pycache_prefix); @@ -383,8 +385,6 @@ dump_config(void) printf("_install_importlib = %i\n", config->_install_importlib); printf("_check_hash_pycs_mode = %s\n", config->_check_hash_pycs_mode); printf("_frozen = %i\n", config->_frozen); - printf("_coerce_c_locale = %i\n", config->_coerce_c_locale); - printf("_coerce_c_locale_warn = %i\n", config->_coerce_c_locale_warn); #undef ASSERT_EQUAL #undef ASSERT_STR_EQUAL @@ -482,6 +482,8 @@ 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; @@ -604,7 +606,8 @@ static int test_init_isolated(void) /* Test _PyCoreConfig.isolated=1 */ _PyCoreConfig config = _PyCoreConfig_INIT; - /* Set utf8_mode to not depend on the locale */ + /* Set coerce_c_locale and utf8_mode to not depend on the locale */ + config.coerce_c_locale = 0; config.utf8_mode = 0; /* Use path starting with "./" avoids a search along the PATH */ config.program_name = L"./_testembed"; diff --git a/Programs/python.c b/Programs/python.c index c7697fa..78e48f8 100644 --- a/Programs/python.c +++ b/Programs/python.c @@ -6,7 +6,7 @@ int wmain(int argc, wchar_t **argv) { - return _Py_WindowsMain(argc, argv); + return Py_Main(argc, argv); } #else int |