bpo-32030: Fix Py_GetPath(): init program_name by vstinner · Pull Request #4665 · python/cpython (original) (raw)
- _PyMainInterpreterConfig_ReadEnv() now sets program_name from
environment variables and pymain_parse_envvars() implements the
falls back on argv[0]. - Remove _PyMain.program_name: use the program_name from
_PyMainInterpreterConfig - Move the Py_SetProgramName() call back to pymain_init_python(),
just before _Py_InitializeCore(). - pathconfig_global_init() now also calls
_PyMainInterpreterConfig_Read() to set program_name if it isn't set
yet - Cleanup PyCalculatePath: pass main_config to subfunctions to get
directly fields from main_config (home, module_search_path_env and
program_name)
https://bugs.python.org/issue32030
- _PyMainInterpreterConfig_ReadEnv() now sets program_name from environment variables and pymain_parse_envvars() implements the falls back on argv[0].
- Remove _PyMain.program_name: use the program_name from _PyMainInterpreterConfig
- Move the Py_SetProgramName() call back to pymain_init_python(), just before _Py_InitializeCore().
- pathconfig_global_init() now also calls _PyMainInterpreterConfig_Read() to set program_name if it isn't set yet
- Cleanup PyCalculatePath: pass main_config to subfunctions to get directly fields from main_config (home, module_search_path_env and program_name)
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request
vstinner added a commit that referenced this pull request