]> granicus.if.org Git - python/commit
bpo-36763: _PyCoreConfig_SetPyArgv() preinitializes Python (GH-13037)
authorVictor Stinner <vstinner@redhat.com>
Thu, 2 May 2019 19:25:34 +0000 (15:25 -0400)
committerGitHub <noreply@github.com>
Thu, 2 May 2019 19:25:34 +0000 (15:25 -0400)
commit70005ac0fddd8585725b92acd1bc2b8e7b81999c
treef1be156bc866978bc4d251879f1e285cfa2df7ee
parent709d23dee69e700b87d5a4cb59e149d0e1af7993
bpo-36763: _PyCoreConfig_SetPyArgv() preinitializes Python (GH-13037)

_PyCoreConfig_SetPyArgv() and _PyCoreConfig_SetWideString() now
pre-initialize Python if needed to ensure that the locale encoding is
properly configured.

* Add _Py_PreInitializeFromPyArgv() internal function.
* Add 'args' parameter to _Py_PreInitializeFromCoreConfig()
Include/internal/pycore_pylifecycle.h
Modules/main.c
Python/coreconfig.c
Python/pylifecycle.c