Message322533
Interesting... pylifecycle.c uses code in main.c, I hadn't expected that.
If I've read the code correctly Py_Initialize won't look at PYTHONOPTIMZE at all (and other environment variables that have a command-line equivalent). Those are read in main.c:cmdline_get_env_flags, which is only called (indirectly) from Py_Main and _Py_UnixMain.
I'm note sure what's the correct solution for this.
1. Reading PYTHONOPTIMZE (and related variables) could be done
in _PyCoreConfig_Read, but that would then need to grow a flag to ensure
that this won't replace values calculated earlier in the implementation
of Py_Main
2. Writing back the global variables is probably best done using a new
function (lets _PyCoreConfig_SetGlobals), mirroring
pymain_set_global_config but using a _PyCoreConfig config structure
instead of the command-line structure used by the latter function. |
|
Date |
User |
Action |
Args |
2018-07-28 09:52:51 | ronaldoussoren | set | recipients:
+ ronaldoussoren, brett.cannon, ncoghlan, vstinner, ned.deily, eric.snow |
2018-07-28 09:52:51 | ronaldoussoren | set | messageid: <1532771571.29.0.56676864532.issue34247@psf.upfronthosting.co.za> |
2018-07-28 09:52:51 | ronaldoussoren | link | issue34247 messages |
2018-07-28 09:52:51 | ronaldoussoren | create | |
|