summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-04-18 13:20:38 (GMT)
committerGitHub <noreply@github.com>2024-04-18 13:20:38 (GMT)
commit340a02b590681d4753eef0ff63037d0ecb512271 (patch)
tree09300e1018a937cdbe5f4b7be2ccd3dc25402044 /Include
parent0a0756c5edd8c32783a39ef00c47fe4a54deecbc (diff)
downloadcpython-340a02b590681d4753eef0ff63037d0ecb512271.zip
cpython-340a02b590681d4753eef0ff63037d0ecb512271.tar.gz
cpython-340a02b590681d4753eef0ff63037d0ecb512271.tar.bz2
gh-117987: Restore several functions removed in Python 3.13 alpha 1 (GH-117993)
Restore these functions removed in Python 3.13 alpha 1: * Py_SetPythonHome() * Py_SetProgramName() * PySys_SetArgvEx() * PySys_SetArgv()
Diffstat (limited to 'Include')
-rw-r--r--Include/pylifecycle.h4
-rw-r--r--Include/sysmodule.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
index c1e2bc5..de1bcb1 100644
--- a/Include/pylifecycle.h
+++ b/Include/pylifecycle.h
@@ -34,8 +34,12 @@ PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv);
PyAPI_FUNC(int) Py_BytesMain(int argc, char **argv);
/* In pathconfig.c */
+Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *);
Py_DEPRECATED(3.13) PyAPI_FUNC(wchar_t *) Py_GetProgramName(void);
+
+Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetPythonHome(const wchar_t *);
Py_DEPRECATED(3.13) PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void);
+
Py_DEPRECATED(3.13) PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void);
Py_DEPRECATED(3.13) PyAPI_FUNC(wchar_t *) Py_GetPrefix(void);
Py_DEPRECATED(3.13) PyAPI_FUNC(wchar_t *) Py_GetExecPrefix(void);
diff --git a/Include/sysmodule.h b/Include/sysmodule.h
index 7b14f72..5a0af2e 100644
--- a/Include/sysmodule.h
+++ b/Include/sysmodule.h
@@ -7,6 +7,9 @@ extern "C" {
PyAPI_FUNC(PyObject *) PySys_GetObject(const char *);
PyAPI_FUNC(int) PySys_SetObject(const char *, PyObject *);
+Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgv(int, wchar_t **);
+Py_DEPRECATED(3.11) PyAPI_FUNC(void) PySys_SetArgvEx(int, wchar_t **, int);
+
PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...)
Py_GCC_ATTRIBUTE((format(printf, 1, 2)));
PyAPI_FUNC(void) PySys_WriteStderr(const char *format, ...)