[issue34589] Py_Initialize() and Py_Main() should not enable C locale coercion

Nick Coghlan report at bugs.python.org
Tue Sep 11 10:38:51 EDT 2018


Nick Coghlan <ncoghlan at gmail.com> added the comment:

FWIW, this is also why I don't want PEP 432 to expose any wstr fields in the configuration settings: it means embedding applications have to figure out which encoding Python is expecting to be used for those fields.

Everything should be much cleaner if the public API requires those settings to be provided as Py_Unicode objects, and the core configuration step takes care of getting the C API to the point where the embedding application can create Py_Unicode objects for passing to later steps.

The fact that CPython itself currently uses wstr to configure these settings should be considered a legacy implementation detail that we do our best to hide from the public API.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34589>
_______________________________________


More information about the Python-bugs-list mailing list