diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 291a3ae70d8..0130d06c9fc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-04-16 Kevin Buettner + + * python/python.c (do_start_initialization): Don't call + PyEval_InitThreads for Python 3.9 and beyond. + 2020-04-15 Kamil Rytarowski * obsd-nat.c (obsd_nat_target::update_thread_list): Pass "this" to diff --git a/gdb/python/python.c b/gdb/python/python.c index 02543aea710..e56520ab11a 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1701,7 +1701,12 @@ do_start_initialization () #endif Py_Initialize (); +#if PY_VERSION_HEX < 0x03090000 + /* PyEval_InitThreads became deprecated in Python 3.9 and will + be removed in Python 3.11. Prior to Python 3.7, this call was + required to initialize the GIL. */ PyEval_InitThreads (); +#endif #ifdef IS_PY3K gdb_module = PyImport_ImportModule ("_gdb");