mirror of
https://github.com/python/cpython.git
synced 2025-09-04 07:51:13 +00:00
bpo-38234: Py_Initialize() sets global path configuration (GH-16421)
* Py_InitializeFromConfig() now writes PyConfig path configuration to the global path configuration (_Py_path_config). * Add test_embed.test_get_pathconfig(). * Fix typo in _PyWideStringList_Join().
This commit is contained in:
parent
3d984a1fd0
commit
12f2f177fc
4 changed files with 64 additions and 11 deletions
|
@ -475,7 +475,7 @@ pyinit_core_reconfigure(_PyRuntimeState *runtime,
|
|||
config = &interp->config;
|
||||
|
||||
if (config->_install_importlib) {
|
||||
status = _PyPathConfig_Init();
|
||||
status = _PyConfig_WritePathConfig(config);
|
||||
if (_PyStatus_EXCEPTION(status)) {
|
||||
return status;
|
||||
}
|
||||
|
@ -646,7 +646,7 @@ pycore_init_import_warnings(PyThreadState *tstate, PyObject *sysmod)
|
|||
}
|
||||
|
||||
if (config->_install_importlib) {
|
||||
status = _PyPathConfig_Init();
|
||||
status = _PyConfig_WritePathConfig(config);
|
||||
if (_PyStatus_EXCEPTION(status)) {
|
||||
return status;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue