From 8ded5b803705328749622256701b3f08a9d6c5ab Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 24 Jan 2018 17:03:28 +0100 Subject: bpo-32030: Add _PyCoreConfig.module_search_paths (#4954) _PyCoreConfig_Read() is now responsible to compute sys.path. So sys.path is now computed before calling _Py_InitializeCore(). Changes: * Add module_search_path, module_search_paths, executable, prefix, base_prefix, exec_prefix and base_exec_prefix to _PyCoreConfig. * _PyMainInterpreterConfig_Read() now only converts wchar_t** lists into a Python list, it doesn't compute sys.path anymore. --- PC/getpathp.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'PC') diff --git a/PC/getpathp.c b/PC/getpathp.c index c4977e7997..e90a643ab8 100644 --- a/PC/getpathp.c +++ b/PC/getpathp.c @@ -692,6 +692,9 @@ calculate_pth_file(_PyPathConfig *config, wchar_t *prefix) return 0; } + /* FIXME, bpo-32030: Global configuration variables should not be modified + here, _PyPathConfig_Init() is called early in Python initialization: + see pymain_cmdline(). */ return read_pth_file(config, prefix, spbuffer, &Py_IsolatedFlag, &Py_NoSiteFlag); } -- cgit v1.2.1