Closed ericsnowcurrently closed 8 months ago
Maybe you're thinking of gevent
? greenlet
doesn't modify or replace any stdlib modules.
Hmm, I'm going off of what someone reported on https://github.com/python/cpython/issues/112826. I didn't look too closely though. I'll double-check. Thanks for the pointer.
I can confirm that is an eventlet-specific problem. Neither greenlet nor gevent messes with that attribute.
$ python -c 'import sys; import gevent.monkey; import _thread; print(sys.version); gevent.monkey.patch_all(); print(_thread._is_main_interpreter)'
3.12.1 (main, Dec 12 2023, 13:05:57) [Clang 15.0.0 (clang-1500.1.0.2.5)]
<built-in function _is_main_interpreter>
thanks for looking that up
Thanks for the heads-up!
(See https://github.com/python/cpython/issues/112826.)
In the CPython main branch (i.e. 3.13+), as of https://github.com/python/cpython/pull/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 https://github.com/python/cpython/pull/110707.