This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Disable coerce_c_locale and utf8_mode by default in _PyPreConfig?
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ncoghlan, vstinner
Priority: normal Keywords: patch

Created on 2019-03-26 23:04 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 12589 merged vstinner, 2019-03-27 15:04
Messages (3)
msg338922 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-03-26 23:04
bpo-36301 created a very strict separated between Python initialization and a new "pre-initialization" which is responsible to configure encodings and memory allocators.

Nick Coghlan proposed to disable UTF-8 Mode and C locale coercion by default in the pre-initialization, so the LC_CTYPE locale is not coerced by Python when it's embedded in an application.

Maybe the UTF-8 Mode can be automatically enabled (depending on the LC_CTYPE locale), but not the C locale coercion?

This issue is related to bpo-36202: Calling Py_DecodeLocale() before _PyPreConfig_Write() can produce mojibake.
msg338978 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-03-27 17:29
New changeset d929f1838a8fba881ff0148b7fc31f6265703e3d by Victor Stinner in branch 'master':
bpo-36443: Disable C locale coercion and UTF-8 Mode by default (GH-12589)
https://github.com/python/cpython/commit/d929f1838a8fba881ff0148b7fc31f6265703e3d
msg338980 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-03-27 17:30
Done. I close the issue.
History
Date User Action Args
2022-04-11 14:59:13adminsetgithub: 80624
2019-03-27 17:30:10vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg338980

stage: patch review -> resolved
2019-03-27 17:29:06vstinnersetmessages: + msg338978
2019-03-27 15:04:47vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request12531
2019-03-26 23:04:10vstinnercreate