Repository navigation
Closed
Labels
3.12only security fixes3.13only security fixesrelease-blockertopic-subinterpreterstype-bugAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
gh-105716 breaks greenlet/eventlet, which apparently was working with the 3.12.0 release.
this is greenlet 3.0.1, plus eventlet 0.33.3 plus the python3.12 for eventlet taken from
https://src.fedoraproject.org/rpms/python-eventlet/tree/rawhide
Traceback (most recent call last):
File "/home/packages/12/python-eventlet-0.33.3/tests/isolated/patcher_existing_locks_late.py", line 20, in <module>
eventlet.monkey_patch()
File "/home/packages/12/python-eventlet-0.33.3/eventlet/patcher.py", line 294, in monkey_patch
modules_to_patch += modules_function()
^^^^^^^^^^^^^^^^^^
File "/home/packages/12/python-eventlet-0.33.3/eventlet/patcher.py", line 480, in _green_thread_modules
from eventlet.green import threading
File "/home/packages/12/python-eventlet-0.33.3/eventlet/green/threading.py", line 22, in <module>
eventlet.patcher.inject(
File "/home/packages/12/python-eventlet-0.33.3/eventlet/patcher.py", line 109, in inject
module = __import__(module_name, {}, {}, module_name.split('.')[:-1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/threading.py", line 40, in <module>
_is_main_interpreter = _thread._is_main_interpreter
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'eventlet.green.thread' has no attribute '_is_main_interpreter'
---
FAILCPython versions tested on:
3.12
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Labels
3.12only security fixes3.13only security fixesrelease-blockertopic-subinterpreterstype-bugAn unexpected behavior, bug, or error
Projects
- StatusShow more project fieldsDone
- StatusShow more project fieldsDone
Activity
ericsnowcurrently commentedon Dec 7, 2023
Thanks for bringing this to my attention. I'll take a look.
ericsnowcurrently commentedon Dec 7, 2023
FTR:
original PR: gh-112661
3.12 backport: gh-110707
ericsnowcurrently commentedon Dec 7, 2023
@Yhg1s, should this block 3.12.1? I expect to have a fix up shortly.
ericsnowcurrently commentedon Dec 7, 2023
To be clear, I am not planning on any actual fix in main (3.13+). There will only be a "What's New" entry. If an app or library is replacing the
_threadmodule then they already know they need to provide everything the stdlib module does, including the "private" attributes (especially those used bythreading). This seems like a fairly rare case so I'm okay with helping any such libraries with their fixes.(The situation is different for 3.12, where 3.12.0 was already released and the change in gh-110707 introduced a regression. Thus a fix was needed for 3.12.1.)
In addition to the 3.12 fix, I'm planning on making sure gevent/eventlet gets fixed upstream.
[3.12] gh-112826: Fix the threading Module When _thread is Missing _i…
gh-112826: Add a "What's New" Entry About _thread._is_main_interpreter (
Eclips4 commentedon Dec 8, 2023
Thanks for the fix Eric!
Fix Python 3.13 compat by adding missing attibute '_is_main_interpreter'
Fix Python 3.13 compat by adding missing attibute '_is_main_interpreter'
Fix Python 3.13 compat by adding missing attibute '_is_main_interpreter'
Fix Python 3.13 compat by adding missing attibute '_is_main_interpreter'
Fix Python 3.13 compat by adding missing attibute '_is_main_interpreter'
Fix Python 3.13 compat by adding missing attibute '_is_main_interpret…
pythongh-112826: Add a "What's New" Entry About _thread._is_main_inte…
pythongh-112826: Add a "What's New" Entry About _thread._is_main_inte…