GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-105716 breaks greenlet/eventlet · Issue #112826 · python/cpython

gh-105716 breaks greenlet/eventlet #112826

New issue
Copy link
New issue
Copy link
Closed
Closed
gh-105716 breaks greenlet/eventlet#112826
Copy link
Assignees
ericsnowcurrently
Labels
3.12only security fixesonly security fixes3.13only security fixesonly security fixesrelease-blockertopic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@doko42
doko42
opened on Dec 7, 2023
Issue body actions

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'

---
FAIL

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Linked PRs

  • [3.12] gh-112826: Fix the threading Module When _thread is Missing _is_main_interpreter() #112850
  • gh-112826: Add a "What's New" Entry About _thread._is_main_interpreter #112853

Activity

  1. doko42
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Dec 7, 2023
  2. doko42
    assigned
    doko42
    and
    ericsnowcurrently
    and unassigned
    doko42
    on Dec 7, 2023
  3. sobolevn
    added
    topic-subinterpreters
    on Dec 7, 2023
  4. github-project-automation
    added this to Subinterpreterson Dec 7, 2023
  5. github-project-automation
    moved this to Todo in Subinterpreterson Dec 7, 2023
  6. ericsnowcurrently commented on Dec 7, 2023

    @ericsnowcurrently
    ericsnowcurrently
    on Dec 7, 2023
    Member
    More actions

    Thanks for bringing this to my attention. I'll take a look.

  7. ericsnowcurrently commented on Dec 7, 2023

    @ericsnowcurrently
    ericsnowcurrently
    on Dec 7, 2023
    Member
    More actions

    FTR:

    original PR: gh-112661
    3.12 backport: gh-110707

  8. ericsnowcurrently commented on Dec 7, 2023

    @ericsnowcurrently
    ericsnowcurrently
    on Dec 7, 2023
    Member
    More actions

    @Yhg1s, should this block 3.12.1? I expect to have a fix up shortly.

  9. ericsnowcurrently
    added
    3.12only security fixesonly security fixes
    3.13only security fixesonly security fixes
    release-blocker
    on Dec 7, 2023
  10. ezio-melotti
    added this to Release and Deferred blockers 🚫on Dec 7, 2023
  11. github-project-automation
    moved this to Todo in Release and Deferred blockers 🚫on Dec 7, 2023
  12. ericsnowcurrently commented on Dec 7, 2023

    @ericsnowcurrently
    ericsnowcurrently
    on Dec 7, 2023
    Member
    More actions

    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 _thread module then they already know they need to provide everything the stdlib module does, including the "private" attributes (especially those used by threading). 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.

    Reacted by Kirill Podoprigora and Gregory P. Smith
  13. Yhg1s
    added a commit that references this issue on Dec 7, 2023

    [3.12] gh-112826: Fix the threading Module When _thread is Missing _i…

    c0fc88f
  14. ericsnowcurrently
    added a commit that references this issue on Dec 7, 2023

    gh-112826: Add a "What's New" Entry About _thread._is_main_interpreter (

    64d8b4c
  15. Eclips4 commented on Dec 8, 2023

    @Eclips4
    Eclips4
    on Dec 8, 2023
    Member
    More actions

    Thanks for the fix Eric!

  16. Eclips4
    closed this as completedon Dec 8, 2023
  17. github-project-automation
    moved this from Todo to Done in Release and Deferred blockers 🚫on Dec 8, 2023
  18. github-project-automation
    moved this from Todo to Done in Subinterpreterson Dec 8, 2023
  19. 4383
    added 6 commits that reference this issue on Dec 18, 2023

    Fix Python 3.13 compat by adding missing attibute '_is_main_interpreter'

    9a37756

    Fix Python 3.13 compat by adding missing attibute '_is_main_interpreter'

    8e105fb

    Fix Python 3.13 compat by adding missing attibute '_is_main_interpreter'

    c2999a8

    Fix Python 3.13 compat by adding missing attibute '_is_main_interpreter'

    4e1d634

    Fix Python 3.13 compat by adding missing attibute '_is_main_interpreter'

    11d5dd9

    Fix Python 3.13 compat by adding missing attibute '_is_main_interpret…

    ac50404
  20. aisk
    added a commit that references this issue on Feb 11, 2024

    pythongh-112826: Add a "What's New" Entry About _thread._is_main_inte…

    d1cfbb7
  21. Glyphack
    added a commit that references this issue on Sep 2, 2024

    pythongh-112826: Add a "What's New" Entry About _thread._is_main_inte…

    d98bb49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @ericsnowcurrently
    ericsnowcurrently

Labels

3.12only security fixesonly security fixes3.13only security fixesonly security fixesrelease-blockertopic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

  • Release and Deferred blockers 🚫
    Status
    Done
    Show more project fields
  • Subinterpreters
    Status
    Done
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.