bpo-38234: Remove _PyPathConfig.dll_path (GH-16307)

The DLL path is not computed from any user configuration and cannot
be configured by PyConfig. Instead, add a new _Py_dll_path global variable.

Remove _PyConfig_SetPathConfig(): replaced with _PyPathConfig_Init().

Py_Initialize() now longer sets the "global path configuration",
but only initialize _Py_dll_path.
This commit is contained in:
Victor Stinner 2019-09-21 01:02:56 +02:00 committed by GitHub
parent b1542583be
commit c422167749
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 85 additions and 95 deletions

View file

@ -475,7 +475,7 @@ pyinit_core_reconfigure(_PyRuntimeState *runtime,
config = &interp->config;
if (config->_install_importlib) {
status = _PyConfig_SetPathConfig(config);
status = _PyPathConfig_Init();
if (_PyStatus_EXCEPTION(status)) {
return status;
}
@ -646,7 +646,7 @@ pycore_init_import_warnings(PyThreadState *tstate, PyObject *sysmod)
}
if (config->_install_importlib) {
status = _PyConfig_SetPathConfig(config);
status = _PyPathConfig_Init();
if (_PyStatus_EXCEPTION(status)) {
return status;
}