[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

Nick Coghlan report at bugs.python.org
Sat Nov 25 23:42:25 EST 2017


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

Looking more closely at the code, I've realised Victor's right - there's no way for Py_DecodeLocale() to accidentally trigger an attempt to import the "encodings" module.

Instead, the error is likely coming from the init_sys_streams step towards the end of the initialization process. The way the embedded test cases are currently being run unfortunately truncated that traceback.

Rather than trying to improve the test case error reporting under the scope of this issue, I've instead filed https://bugs.python.org/issue32136 to cover factoring the runtime embedding tests out to their own test file.

----------

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


More information about the Python-bugs-list mailing list