From eb81795d7d3a8c898fa89a376d63fc3bbfb9a081 Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Sun, 18 Jun 2017 12:29:42 +1000 Subject: 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. --- Modules/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Modules/main.c') diff --git a/Modules/main.c b/Modules/main.c index 94400fedd42..08b22760de1 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; } -- cgit v1.2.3