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

Nick Coghlan report at bugs.python.org
Wed Nov 22 19:04:42 EST 2017


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

Victor, I think you're fundamentally misunderstanding the goals of PEP 432.

The entire point is to let people have a *mostly working Python runtime* during CPython startup. Moving everything that Py_Initialize needs to instead have to happen before Py_InitializeRuntime (aka _Py_CoreInitialize) defeats that point.

CoreConfig should thus contain *as little as possible*, with most of the environmental querying work moving into Py_ReadMainInterpreterConfig.

So could you please move everything you've added to CoreConfig (that isn't genuinely required to from the moment the runtime starts doing anything) out again, and either put it into the main interpreter config as Python objects (as described in PEP 432), or else into a new intermediate configuration struct?

----------

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


More information about the Python-bugs-list mailing list