Glade fails to build with Python 3.13: implicit declaration of function ‘PySys_SetArgvEx’, ‘Py_SetProgramName’
In Fedora Linux we attempt to rebuild as many packages as possible before the final release of a new Python. glade fails to build with Python 3.13.0 alpha releases.
../plugins/python/glade-python.c: In function ‘python_init’:
../plugins/python/glade-python.c:55:3: error: implicit declaration of function ‘PySys_SetArgvEx’ [-Werror=implicit-function-declaration]
55 | PySys_SetArgvEx (0, NULL, 0);
| ^~~~~~~~~~~~~~~
../plugins/python/glade-python.c: In function ‘glade_python_setup’:
../plugins/python/glade-python.c:100:3: error: implicit declaration of function ‘Py_SetProgramName’; did you mean ‘Py_GetProgramName’? [-Werror=implicit-function-declaration]
100 | Py_SetProgramName (PY_STRING (PACKAGE_NAME));
| ^~~~~~~~~~~~~~~~~
| Py_GetProgramName
According to https://docs.python.org/3.13/whatsnew/3.13.html:
Remove the following old functions to configure the Python initialization, deprecated in Python 3.11:
- PySys_AddWarnOptionUnicode(): use PyConfig.warnoptions instead.
- PySys_AddWarnOption(): use PyConfig.warnoptions instead.
- PySys_AddXOption(): use PyConfig.xoptions instead.
- PySys_HasWarnOptions(): use PyConfig.xoptions instead.
- PySys_SetArgvEx(): set PyConfig.argv instead.
- PySys_SetArgv(): set PyConfig.argv instead.
- PySys_SetPath(): set PyConfig.module_search_paths instead.
- Py_SetPath(): set PyConfig.module_search_paths instead.
- Py_SetProgramName(): set PyConfig.program_name instead.
- Py_SetPythonHome(): set PyConfig.home instead.
- Py_SetStandardStreamEncoding(): set PyConfig.stdio_encoding instead, and set also maybe PyConfig.legacy_windows_stdio (on Windows).
- _Py_SetProgramFullPath(): set PyConfig.executable instead.