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 /Doc/using | |
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 'Doc/using')
-rw-r--r-- | Doc/using/cmdline.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index 920d5c0..5adad15 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -744,6 +744,11 @@ conflict. :data:`sys.stdin` and :data:`sys.stdout` to ``surrogateescape``. This behavior can be overridden using :envvar:`PYTHONIOENCODING` as usual. + For debugging purposes, setting ``PYTHONCOERCECLOCALE=warn`` will cause + Python to emit warning messages on ``stderr`` if either the locale coercion + activates, or else if a locale that *would* have triggered coercion is + still active when the Python runtime is initialized. + Availability: \*nix .. versionadded:: 3.7 |