Hi,
I removed the _PyOS_ReadlineTState variable from the public C API (it was moved to the internal C API). The gdb project sets its readline callback and uses the _PyOS_ReadlineTState variable and so fails to build on Python 3.13.0 alpha2: https://bugzilla.redhat.com/show_bug.cgi?id=2250652
gdb: PyOS_ReadlineFunctionPointer = gdbpy_readline_wrapper;
The gdb function uses _PyOS_ReadlineTState to use the Python C API:
PyEval_RestoreThread (_PyOS_ReadlineTState);
gdbpy_convert_exception (except);
PyEval_SaveThread ();
source: py-gdb-readline.c
The _PyOS_ReadlineTState variable was added in 2004 by commit 30ea2f2.
The callback is called with the GIL released. The _PyOS_ReadlineTState variable is used to acquire again the GIL.
In 2020, I made fixes related to GIL but not directly to this issue:
Hi,
I removed the
_PyOS_ReadlineTStatevariable from the public C API (it was moved to the internal C API). The gdb project sets its readline callback and uses the_PyOS_ReadlineTStatevariable and so fails to build on Python 3.13.0 alpha2: https://bugzilla.redhat.com/show_bug.cgi?id=2250652gdb:
PyOS_ReadlineFunctionPointer = gdbpy_readline_wrapper;The gdb function uses
_PyOS_ReadlineTStateto use the Python C API:source: py-gdb-readline.c
The
_PyOS_ReadlineTStatevariable was added in 2004 by commit 30ea2f2.The callback is called with the GIL released. The
_PyOS_ReadlineTStatevariable is used to acquire again the GIL.In 2020, I made fixes related to GIL but not directly to this issue: