[Python-Dev] New _Py_InitializeFromConfig() function (PEP 432)
On Jul 31, 2018, at 15:14, Victor Stinner <vstinner at redhat.com> wrote:
> I finished my work on the _PyCoreConfig structure: it's a C structure
> in Include/pystate.h which has many fields used to configure Python
> initialization. In Python 3.6 and older, these parameters were scatted
> around the code, and it was hard to get an exhaustive list of it.
Great work Victor! +1 for making _PyCoreConfig public, although I?m sure you?re only proposing that for Python 3.8, not in any future backport.
> I had to refactor a lot of code to implement all of that.
> The problem is that Python 3.7 got the half-baked implementation, and
> it caused issues:
> * Calling Py_Main() after Py_Initialize() fails with a fatal error on
> Python 3.7.0
> * PYTHONOPTIMIZE environment variable is ignored by Py_Initialize()
> I fixed the first issue, I'm now working on the second one to see how
> it can be fixed. Other option would be to backport the code from
> master to the 3.7 branch, since the code in master has a way better
> design. But it requires to backport a lot of changes. I'm not sure yet
> what is the best option.
Do you have WIP branch for the backport? I agree that it?s probably low enough risk given the private nature of the API in 3.7, but that it?s up to Ned to decide.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: Message signed with OpenPGP