https://bugs.documentfoundation.org/show_bug.cgi?id=158447
Bug ID: 158447
Summary: Update Python C API for Python 3.13
Product: LibreOffice
Version: 7.3.6.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
Description:
libreoffice fails to build with Python 3.13.0a1.
/builddir/build/BUILD/libreoffice-7.6.3.1/pyuno/source/loader/pyuno_loader.cxx:
In function ‘void pyuno_loader::setPythonHome(const rtl::OUString&)’:
/builddir/build/BUILD/libreoffice-7.6.3.1/pyuno/source/loader/pyuno_loader.cxx:133:5:
error: ‘Py_SetPythonHome’ was not declared in this scope; did you mean
‘Py_GetPythonHome’?
133 | Py_SetPythonHome(wide); // deprecated since python 3.11
| ^~~~~~~~~~~~~~~~
| Py_GetPythonHome
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.
https://docs.python.org/3.13/whatsnew/3.13.html
https://bugzilla.redhat.com/show_bug.cgi?id=2250857
Actual Results:
libreoffice fails to build with Python 3.13.0a1.
/builddir/build/BUILD/libreoffice-7.6.3.1/pyuno/source/loader/pyuno_loader.cxx:
In function ‘void pyuno_loader::setPythonHome(const rtl::OUString&)’:
/builddir/build/BUILD/libreoffice-7.6.3.1/pyuno/source/loader/pyuno_loader.cxx:133:5:
error: ‘Py_SetPythonHome’ was not declared in this scope; did you mean
‘Py_GetPythonHome’?
133 | Py_SetPythonHome(wide); // deprecated since python 3.11
| ^~~~~~~~~~~~~~~~
| Py_GetPythonHome
Expected Results:
Build succeeds
Reproducible: Always
User Profile Reset: No
Additional Info:
Python 3.13 will likely be shipped in Fedora 41.
--
You are receiving this mail because:
You are the assignee for the bug.