bpo-36301: Cleanup preconfig code by vstinner · Pull Request #12535 · python/cpython

@vstinner

Prepare code to move some _PyPreConfig parameters into _PyPreCmdline.
Changes:

* _PyCoreConfig_ReadFromArgv(): remove preconfig parameter,
  use _PyRuntime.preconfig.
* Add _PyPreCmdline_GetPreConfig(). _PyPreConfig_Read() now calls it.
* Rename _PyPreCmdline_Init() to _PyPreCmdline_SetArgv()
* Factorize _Py_PreInitializeFromPreConfig() code: add
  pyinit_preinit().
* _PyPreConfig_Read() now sets coerce_c_locale to 2 if it should be
  coerced.
* Remove _PyCoreConfig_ReadPreConfig()
* _PyCoreConfig_Write() now copies updated preconfig into _PyRuntime