Message296007
I wrote a PR to remove PEP 538 warnings:
https://github.com/python/cpython/pull/2186
Reference (unpatched):
haypo@selma$ env -i LC_ALL=C ./python -c "import locale; print(locale.getpreferredencoding())"
Python runtime initialized with LC_CTYPE=C (a locale with default ASCII encoding), which may cause Unicode compatibility problems. Using C.UTF-8, C.utf8, or UTF-8 (if available) as alternative Unicode-compatible locales is recommended.
ANSI_X3.4-1968
haypo@selma$ env -i LC_CTYPE=C ./python -c "import locale; print(locale.getpreferredencoding())"
Python detected LC_CTYPE=C: LC_CTYPE coerced to C.UTF-8 (set another locale or PYTHONCOERCECLOCALE=0 to disable this locale coercion behavior).
UTF-8
haypo@selma$ env -i LC_ALL=C ./python -c "import locale; print(locale.getpreferredencoding())"
Python runtime initialized with LC_CTYPE=C (a locale with default ASCII encoding), which may cause Unicode compatibility problems. Using C.UTF-8, C.utf8, or UTF-8 (if available) as alternative Unicode-compatible locales is recommended.
ANSI_X3.4-1968
With my change:
haypo@selma$ env -i ./python -c "import locale; print(locale.getpreferredencoding())"
UTF-8
haypo@selma$ env -i LC_CTYPE=C ./python -c "import locale; print(locale.getpreferredencoding())"
UTF-8
haypo@selma$ env -i LC_ALL=C ./python -c "import locale; print(locale.getpreferredencoding())"
ANSI_X3.4-1968 |
|
Date |
User |
Action |
Args |
2017-06-14 14:27:14 | vstinner | set | recipients:
+ vstinner, barry, ncoghlan |
2017-06-14 14:27:14 | vstinner | set | messageid: <1497450434.17.0.597349991999.issue30565@psf.upfronthosting.co.za> |
2017-06-14 14:27:14 | vstinner | link | issue30565 messages |
2017-06-14 14:27:14 | vstinner | create | |
|