summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAntoine Pitrou <pitrou@free.fr>2017-09-18 20:04:20 (GMT)
committerGitHub <noreply@github.com>2017-09-18 20:04:20 (GMT)
commitb43c4caf81b10e5c7ebaeb3a712c6db584f60bbd (patch)
treedd02bc320029d436470d906bde52e8357e191217 /Doc
parenta8e7d903d7c4dd3a64412016e9f44f0e75f1fb3f (diff)
downloadcpython-b43c4caf81b10e5c7ebaeb3a712c6db584f60bbd.zip
cpython-b43c4caf81b10e5c7ebaeb3a712c6db584f60bbd.tar.gz
cpython-b43c4caf81b10e5c7ebaeb3a712c6db584f60bbd.tar.bz2
Restore dummy_threading and _dummy_thread, but deprecate them (bpo-31370) (#3648)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/_dummy_thread.rst17
-rw-r--r--Doc/library/_thread.rst10
-rw-r--r--Doc/library/concurrency.rst2
-rw-r--r--Doc/library/dummy_threading.rst17
-rw-r--r--Doc/library/threading.rst4
5 files changed, 19 insertions, 31 deletions
diff --git a/Doc/library/_dummy_thread.rst b/Doc/library/_dummy_thread.rst
index ebce74d..7dccbc5 100644
--- a/Doc/library/_dummy_thread.rst
+++ b/Doc/library/_dummy_thread.rst
@@ -6,18 +6,15 @@
**Source code:** :source:`Lib/_dummy_thread.py`
---------------
-
-This module provides a duplicate interface to the :mod:`_thread` module. It is
-meant to be imported when the :mod:`_thread` module is not provided on a
-platform.
+.. deprecated:: 3.7
+ Python now always has threading enabled. Please use :mod:`_thread`
+ (or, better, :mod:`threading`) instead.
-Suggested usage is::
+--------------
- try:
- import _thread
- except ImportError:
- import _dummy_thread as _thread
+This module provides a duplicate interface to the :mod:`_thread` module.
+It was meant to be imported when the :mod:`_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
diff --git a/Doc/library/_thread.rst b/Doc/library/_thread.rst
index 0d2d818..67cb709 100644
--- a/Doc/library/_thread.rst
+++ b/Doc/library/_thread.rst
@@ -23,14 +23,10 @@ threading API built on top of this module.
single: pthreads
pair: threads; POSIX
-The module is optional. It is supported on Windows, Linux, SGI IRIX, Solaris
-2.x, as well as on systems that have a POSIX thread (a.k.a. "pthread")
-implementation. For systems lacking the :mod:`_thread` module, the
-:mod:`_dummy_thread` module is available. It duplicates this module's interface
-and can be used as a drop-in replacement.
-
-It defines the following constants and functions:
+.. versionchanged:: 3.7
+ This module used to be optional, it is now always available.
+This module defines the following constants and functions:
.. exception:: error
diff --git a/Doc/library/concurrency.rst b/Doc/library/concurrency.rst
index 0de281b..826bf86 100644
--- a/Doc/library/concurrency.rst
+++ b/Doc/library/concurrency.rst
@@ -26,6 +26,6 @@ The following are support modules for some of the above services:
.. toctree::
- dummy_threading.rst
_thread.rst
_dummy_thread.rst
+ dummy_threading.rst
diff --git a/Doc/library/dummy_threading.rst b/Doc/library/dummy_threading.rst
index 30a3ebb..dfc3289 100644
--- a/Doc/library/dummy_threading.rst
+++ b/Doc/library/dummy_threading.rst
@@ -6,20 +6,15 @@
**Source code:** :source:`Lib/dummy_threading.py`
---------------
-
-This module provides a duplicate interface to the :mod:`threading` module. It
-is meant to be imported when the :mod:`_thread` module is not provided on a
-platform.
+.. deprecated:: 3.7
+ Python now always has threading enabled. Please use :mod:`threading` instead.
-Suggested usage is::
+--------------
- try:
- import threading
- except ImportError:
- import dummy_threading as threading
+This module provides a duplicate interface to the :mod:`threading` module.
+It was meant to be imported when the :mod:`_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.
-
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
index 021e29e..8c3a2cd 100644
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -11,8 +11,8 @@
This module constructs higher-level threading interfaces on top of the lower
level :mod:`_thread` module. See also the :mod:`queue` module.
-The :mod:`dummy_threading` module is provided for situations where
-:mod:`threading` cannot be used because :mod:`_thread` is missing.
+.. versionchanged:: 3.7
+ This module used to be optional, it is now always available.
.. note::