This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Remove deprecated _dummy_thread and dummy_threading modules
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: eric.snow, pitrou, vstinner
Priority: normal Keywords: patch

Created on 2019-06-17 08:02 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 14143 merged vstinner, 2019-06-17 08:05
Messages (5)
msg345810 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-06-17 08:02
The _dummy_thread and dummy_threading modules are deprecated since Python 3.7 which now requires threading support. Attached PR removes these modules.
msg345811 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-06-17 08:07
Python 3.7 has been modified to always require threading support:

* https://bugs.python.org/issue31370
* https://mail.python.org/pipermail/python-dev/2017-September/149156.html

commit a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344
Author: Antoine Pitrou <pitrou@free.fr>
Date:   Thu Sep 7 18:56:24 2017 +0200
 
    bpo-31370: Remove support for threads-less builds (#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."

https://docs.python.org/dev/library/dummy_threading.html

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.
msg345850 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-06-17 12:18
New changeset 8bf08ee45b7c2341f0d0175b91892843a37c23da by Victor Stinner in branch 'master':
bpo-37312: Remove _dummy_thread and dummy_threading modules (GH-14143)
https://github.com/python/cpython/commit/8bf08ee45b7c2341f0d0175b91892843a37c23da
msg345851 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-06-17 12:20
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.
msg348512 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2019-07-26 17:44
FTR, Antoine originally removed in b43c4caf81b10e5c7ebaeb3a712c6db584f60bbd and added back (but deprecated) a few days later in b43c4caf81b10e5c7ebaeb3a712c6db584f60bbd. [1]  That happened in September 2017 for Python 3.7.


[1] https://bugs.python.org/issue31370#msg302476
History
Date User Action Args
2022-04-11 14:59:16adminsetgithub: 81493
2019-07-26 17:44:20eric.snowsetnosy: + pitrou, eric.snow
messages: + msg348512
2019-06-17 12:20:26vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg345851

stage: patch review -> resolved
2019-06-17 12:18:47vstinnersetmessages: + msg345850
2019-06-17 08:07:53vstinnersetmessages: + msg345811
2019-06-17 08:05:48vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request13984
2019-06-17 08:02:35vstinnercreate