gh-133644: Remove deprecated Python initialization getter functions (#133661)

Remove functions:

* Py_GetExecPrefix()
* Py_GetPath()
* Py_GetPrefix()
* Py_GetProgramFullPath()
* Py_GetProgramName()
* Py_GetPythonHome()
This commit is contained in:
Bénédikt Tran 2025-05-09 13:39:23 +02:00 committed by GitHub
parent f52de8a937
commit 5044e85265
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 93 additions and 238 deletions

View file

@ -272,7 +272,8 @@ Py_SetProgramName(const wchar_t *program_name)
}
wchar_t *
/* removed in 3.15, but kept for stable ABI compatibility */
PyAPI_FUNC(wchar_t *)
Py_GetPath(void)
{
/* If the user has provided a path, return that */
@ -284,7 +285,7 @@ Py_GetPath(void)
}
wchar_t *
PyAPI_FUNC(wchar_t *)
_Py_GetStdlibDir(void)
{
wchar_t *stdlib_dir = _Py_path_config.stdlib_dir;
@ -295,35 +296,40 @@ _Py_GetStdlibDir(void)
}
wchar_t *
/* removed in 3.15, but kept for stable ABI compatibility */
PyAPI_FUNC(wchar_t *)
Py_GetPrefix(void)
{
return _Py_path_config.prefix;
}
wchar_t *
/* removed in 3.15, but kept for stable ABI compatibility */
PyAPI_FUNC(wchar_t *)
Py_GetExecPrefix(void)
{
return _Py_path_config.exec_prefix;
}
wchar_t *
/* removed in 3.15, but kept for stable ABI compatibility */
PyAPI_FUNC(wchar_t *)
Py_GetProgramFullPath(void)
{
return _Py_path_config.program_full_path;
}
wchar_t*
/* removed in 3.15, but kept for stable ABI compatibility */
PyAPI_FUNC(wchar_t *)
Py_GetPythonHome(void)
{
return _Py_path_config.home;
}
wchar_t *
/* removed in 3.15, but kept for stable ABI compatibility */
PyAPI_FUNC(wchar_t *)
Py_GetProgramName(void)
{
return _Py_path_config.program_name;