New submission from anthony shaw <anthony.p.s...@gmail.com>: observing a behaviour on Python 3.7 b2 that doesn't match what's documented in PEP 538
PEP 538 states that the locale coercion behaviour can be disabled through the PYTHONCOERCECLOCALE environment variable. I would then expect the stdin encoding to be the same as Python 3.6 when the C locale is specified with no encoding value. bash-3.2$ LANG=C python3.6 -c "import sys; print(sys.stdin.encoding)" US-ASCII bash-3.2$ LANG=C python3.7 -c "import sys; print(sys.stdin.encoding)" utf-8 bash-3.2$ PYTHONCOERCECLOCALE=0 LANG=C python3.7 -c "import sys; print(sys.stdin.encoding)" utf-8 LC_ALL is not set bash-3.2$ locale LANG="C" LC_COLLATE="C" LC_CTYPE="C" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL= Trying to dig into the reason why the env flag isn't disabling the behaviour I found some subsequent changes after the PEP which look to have broken the original implementation behaviour. https://github.com/python/cpython/commit/9454060e84a669dde63824d9e2fcaf295e34f687 ---------- messages: 316045 nosy: anthony shaw priority: normal severity: normal status: open title: PYTHONCOERCECLOCALE no longer being respected type: behavior versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33405> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com