mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
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.
This commit is contained in:
parent
6a98a04e21
commit
eb81795d7d
5 changed files with 184 additions and 122 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue