Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated _dummy_thread and dummy_threading modules #81493

vstinner opened this issue Jun 17, 2019 · 5 comments

Remove deprecated _dummy_thread and dummy_threading modules #81493

vstinner opened this issue Jun 17, 2019 · 5 comments
3.9 only security fixes stdlib Python modules in the Lib dir


Copy link

BPO 37312
Nosy @pitrou, @vstinner, @ericsnowcurrently
  • bpo-37312: Remove _dummy_thread and dummy_threading modules #14143
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-06-17.12:20:26.307>
    created_at = <Date 2019-06-17.08:02:35.731>
    labels = ['library', '3.9']
    title = 'Remove deprecated _dummy_thread and dummy_threading modules'
    updated_at = <Date 2019-07-26.17:44:20.010>
    user = '' fields:

    activity = <Date 2019-07-26.17:44:20.010>
    actor = 'eric.snow'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-06-17.12:20:26.307>
    closer = 'vstinner'
    components = ['Library (Lib)']
    creation = <Date 2019-06-17.08:02:35.731>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37312
    keywords = ['patch']
    message_count = 5.0
    messages = ['345810', '345811', '345850', '345851', '348512']
    nosy_count = 3.0
    nosy_names = ['pitrou', 'vstinner', 'eric.snow']
    pr_nums = ['14143']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = ''
    versions = ['Python 3.9']

    Copy link
    Member Author

    The _dummy_thread and dummy_threading modules are deprecated since Python 3.7 which now requires threading support. Attached PR removes these modules.

    @vstinner vstinner added 3.9 only security fixes stdlib Python modules in the Lib dir labels Jun 17, 2019
    Copy link
    Member Author

    Python 3.7 has been modified to always require threading support:

    commit a6a4dc8
    Author: Antoine Pitrou <>
    Date: Thu Sep 7 18:56:24 2017 +0200

    bpo-31370: Remove support for threads-less builds (bpo-3385)
    * Remove Setup.config
    * Always define WITH_THREAD for compatibility.


    In Python 3.8, the dummy_threading module is documented as:

    "This module provides a duplicate interface to the threading module. It was meant to be imported when the _thread module was not provided on a platform.

    Be careful to not use this module where deadlock might occur from a thread being created that blocks waiting for another thread to be created. This often occurs with blocking I/O."

    And the doc starts with: "Deprecated since version 3.7: Python now always has threading enabled. Please use threading instead."

    IMHO it's now time to remove this module.


    I proposed to remove these modules today after I saw a bug on _dummy_thread: bpo-36688.

    Copy link
    Member Author

    New changeset 8bf08ee by Victor Stinner in branch 'master':
    bpo-37312: Remove _dummy_thread and dummy_threading modules (GH-14143)

    Copy link
    Member Author

    Bye bye dummy_threading. As explained in PR 14143, I kept a reference to dummy_threading in 2to3 on purpose. Keep it there is fine, it helps to port legacy Python 2 code to Python 3.

    Copy link

    FTR, Antoine originally removed in b43c4ca and added back (but deprecated) a few days later in b43c4ca. [1] That happened in September 2017 for Python 3.7.


    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    3.9 only security fixes stdlib Python modules in the Lib dir
    None yet

    No branches or pull requests

    2 participants