Message296240
| Author |
ncoghlan |
| Recipients |
barry, methane, ncoghlan, vstinner |
| Date |
2017年06月17日.14:52:58 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1497711179.39.0.224581746421.issue30565@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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) |
|
History
|
|---|
| 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 |
|