]> granicus.if.org Git - python/commit
[3.8] bpo-38234: Fix PyConfig_Read() when Py_SetPath() was called (GH-16298) (GH...
authorVictor Stinner <vstinner@redhat.com>
Sat, 21 Sep 2019 00:13:14 +0000 (02:13 +0200)
committerGitHub <noreply@github.com>
Sat, 21 Sep 2019 00:13:14 +0000 (02:13 +0200)
commit9f3dcf802eefeb5ab821ce3c7204ab46557d53d7
treed1e7b26a770e63c9654a3596d0080790ec732eec
parent245d439320e0921459502883fe809213e3b93e35
[3.8] bpo-38234: Fix PyConfig_Read() when Py_SetPath() was called (GH-16298) (GH-16313)

* 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.

(cherry picked from commit c422167749f92d4170203e996a2c619c818335ea)

* bpo-38234: Fix PyConfig_Read() when Py_SetPath() was called (GH-16298)

* If Py_SetPath() has been called, _PyConfig_InitPathConfig() now
  uses its value.
* Py_Initialize() now longer copies path configuration from PyConfig
  to the global path configuration (_Py_path_config).

(cherry picked from commit e267793aa4101b2771ed0e66aaff5743d23f59af)
Include/internal/pycore_initconfig.h
Include/internal/pycore_pathconfig.h
Misc/NEWS.d/next/C API/2019-09-20-17-22-41.bpo-38234.ZbquVK.rst [new file with mode: 0644]
Modules/getpath.c
PC/getpathp.c
Python/pathconfig.c
Python/pylifecycle.c