Message296240
By having the warnings always compiled in, but off by default, "PYTHONCOERCECLOCALE=warn" becomes a debugging tool for integration failures that we (or end users) suspect might be due to the locale coercion behaviour. It's essentially an even more esoteric variant of tools like "PYTHONINSPECT=1", "python -X faulthandler", "python -v", etc.
I already learned something myself based on updating the test cases to cover the opt-in warning model: I initially thought that when we set "LC_ALL=C" we'd get *both* warnings, but we don't (at least with glibc).
My working theory is that setting 'LC_ALL=C' causes 'setlocale(LC_CTYPE, "C.UTF-8")' to fail, even if there's otherwise a C.UTF-8 locale available. (I haven't conclusively proven that theory, but it's the most likely point for the locale coercion to be implicitly bypassed) |
|
Date |
User |
Action |
Args |
2017-06-17 14:52:59 | ncoghlan | set | recipients:
+ ncoghlan, barry, vstinner, methane |
2017-06-17 14:52:59 | ncoghlan | set | messageid: <1497711179.39.0.224581746421.issue30565@psf.upfronthosting.co.za> |
2017-06-17 14:52:59 | ncoghlan | link | issue30565 messages |
2017-06-17 14:52:58 | ncoghlan | create | |
|