bpo-44113: Deprecate old functions to config Python init (GH-26060)
Deprecate the following functions to configure the Python initialization: * PySys_AddWarnOption() * PySys_AddWarnOptionUnicode() * PySys_AddXOption() * PySys_HasWarnOptions() * Py_SetPath() * Py_SetProgramName() * Py_SetPythonHome() * Py_SetStandardStreamEncoding() * _Py_SetProgramFullPath() Use the new PyConfig API of the Python Initialization Configuration instead (PEP 587).
This commit is contained in:
@@ -22,6 +22,11 @@
|
||||
/* Use path starting with "./" avoids a search along the PATH */
|
||||
#define PROGRAM_NAME L"./_testembed"
|
||||
|
||||
// Ignore Py_DEPRECATED() compiler warnings: deprecated functions are
|
||||
// tested on purpose here.
|
||||
_Py_COMP_DIAG_PUSH
|
||||
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
|
||||
|
||||
static void _testembed_Py_Initialize(void)
|
||||
{
|
||||
Py_SetProgramName(PROGRAM_NAME);
|
||||
|
||||
Reference in New Issue
Block a user