AttributeError: module 'threading' has no attribute 'get_native_id'
in matplotlib/pyplot.py:337
def _warn_if_gui_out_of_main_thread():
# This compares native thread ids because even if python-level Thread
# objects match, the underlying OS thread (which is what really matters)
# may be different on Python implementations with green threads.
if (_get_required_interactive_framework(_get_backend_mod()) and
> threading.get_native_id() != threading.main_thread().native_id):
E AttributeError: module 'threading' has no attribute 'get_native_id'
I would guess that's better than nothing? This was added in #23445 to better support green threads, which may not really be a problem with pypy anyways? (I don't know if such threading libraries exist for pypy...)
Activity
QuLogic commented on Oct 14, 2022
@anntzer should we just fall back to the previous thread ID implementation when get_native_id is unavailable?
anntzer commented on Oct 14, 2022
I would guess that's better than nothing? This was added in #23445 to better support green threads, which may not really be a problem with pypy anyways? (I don't know if such threading libraries exist for pypy...)
Fall back to Python-level Thread for GUI warning
ax3l commented on Oct 15, 2022
Thank you all for the fix! 🎉
Fall back to Python-level Thread for GUI warning
Fall back to Python-level Thread for GUI warning
Fall back to Python-level Thread for GUI warning
Fall back to Python-level Thread for GUI warning