(See python/cpython#112826.)
In the CPython main branch (i.e. 3.13+), as of python/cpython#112661, the threading module expects the _thread module to provide _is_main_interpreter(). Apparently it doesn't.
I'd like to make sure that gets fixed as soon as possible. I'd be glad to open a PR but it would help to first have some instruction on where to look for the relevant code.
FYI, the same expectation applies with the upcoming CPython 3.12.1 release, as of python/cpython#110707.