Issue 39123: PyThread_xxx() not available when using limited API (original) (raw)
These functions (e.g. PyThread_allocate_lock() etc) are not declared inside
#if !defined(Py_LIMITED_API)
in pythread.h, yet they're not exported from python3.lib.
IMHO, ideal would be to just provide these functions in the library, as they exist since basically always, but if the intention is to not make them part of the limited API, a guard around their declarations in the header should be added so that using them at least results in link-time errors instead of compile-time ones when using limited API.
In Python 3.10, the functions: PyThread_allocate_lock, PyThread_exit_thread, PyThread_free_lock, PyThread_get_stacksize, PyThread_get_thread_ident, PyThread_get_thread_native_id, PyThread_init_thread, PyThread_release_lock, PyThread_set_stacksize, PyThread_start_new_thread
are exported as part of the stable ABI. They were added in bpo-42545 and bpo-43795 (PEP 652). Sorry for the delay.