[issue37312] Remove deprecated _dummy_thread and dummy_threading modules

STINNER Victor report at bugs.python.org
Mon Jun 17 04:07:53 EDT 2019


STINNER Victor <vstinner at redhat.com> added the comment:

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 at 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.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37312>
_______________________________________


More information about the Python-bugs-list mailing list