[Python-Dev] New _Py_InitializeFromConfig() function (PEP 432)
2018-08-02 1:18 GMT+02:00 Eric Snow <ericsnowcurrently at gmail.com>:
> Backporting shouldn't be so risky since it's all private API and there
> are few other changes in the relevant code since 3.7, right? It
> depends on if Ned's okay with it or not. :)
I'm still doing further bug fixes and cleanup in the master branch:
I'm doing more and more changes. I just added two new files:
Include/coreconfig.h and Python/coreconfig.h. IMHO it's better to put
similar code in separated files.
FYI Python/coreconfig.c has 954 files and Include/coreconfig.h has 319 lines.
I'm ok to rename the structure and the files if you prefer a different name.
About that, I'm working on a subproject: abandon Py_xxx global
configuration variables to replace them with accessing
interpreter->core_config->xxx. I'm not sure yet if it's a good idea or
not, but it would allow to have two interpreters to have their own
different configuration. Imagine two interpreters with different
sys.path running in isolated mode. Or maybe an interpreter without
One of the issue is that we have now two copies of the same option.
For example, Py_BytesWarningFlag and
interpreter->core_config->bytes_warning. That's why I would like to
switch to core_config.
But I'm also trying to make sure that the two variables have the same value: