diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2017-06-18 02:29:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-18 02:29:42 (GMT) |
commit | eb81795d7d3a8c898fa89a376d63fc3bbfb9a081 (patch) | |
tree | d991860d1d359c87dc4b609c421ad746fbc06d21 /Modules | |
parent | 6a98a04e21fc3209b2170c3930ce4488e89680e3 (diff) | |
download | cpython-eb81795d7d3a8c898fa89a376d63fc3bbfb9a081.zip cpython-eb81795d7d3a8c898fa89a376d63fc3bbfb9a081.tar.gz cpython-eb81795d7d3a8c898fa89a376d63fc3bbfb9a081.tar.bz2 |
bpo-30565: Add PYTHONCOERCECLOCALE=warn runtime flag (GH-2260)
- removes PY_WARN_ON_C_LOCALE build time flag
- locale coercion and compatibility warnings are now always compiled
in, but are off by default
- adds PYTHONCOERCECLOCALE=warn runtime option to aid in
debugging potentially locale related compatibility problems
Due to not-yet-resolved test failures on *BSD systems (including
Mac OS X), this also temporarily disables UTF-8 as a locale coercion
target, and skips testing the interpreter's behavior in the POSIX locale.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/main.c b/Modules/main.c index 94400fe..08b2276 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -105,10 +105,10 @@ static const char usage_6[] = " predictable seed.\n" "PYTHONMALLOC: set the Python memory allocators and/or install debug hooks\n" " on Python memory allocators. Use PYTHONMALLOC=debug to install debug\n" -" hooks.\n"; -static const char usage_7[] = +" hooks.\n" "PYTHONCOERCECLOCALE: if this variable is set to 0, it disables the locale\n" -" coercion behavior\n"; +" coercion behavior. Use PYTHONCOERCECLOCALE=warn to request display of\n" +" locale coercion and locale compatibility warnings on stderr.\n"; static int usage(int exitcode, const wchar_t* program) @@ -125,7 +125,6 @@ usage(int exitcode, const wchar_t* program) fprintf(f, usage_4, (wint_t)DELIM); fprintf(f, usage_5, (wint_t)DELIM, PYTHONHOMEHELP); fputs(usage_6, f); - fputs(usage_7, f); } return exitcode; } |