summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2020-01-07 18:44:00 -0800
committerBenjamin Peterson <benjamin@python.org>2020-01-07 18:44:39 -0800
commit48ffe3cdef4548d094637a8187453f7492a90dab (patch)
tree4b58dc042a011390db1d074cb12b8662ef427e30
parent9e824c0e8aabd93f0d366ea9cac721a22ebc03a1 (diff)
downloadsix-git-48ffe3cdef4548d094637a8187453f7492a90dab.tar.gz
Point _dummy_thread to _thread on Python 3.9.
Fixes #317.
-rw-r--r--CHANGES4
-rw-r--r--documentation/index.rst3
-rw-r--r--six.py2
3 files changed, 7 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 797169f..3dda8d4 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,10 @@ This file lists the changes in each six version.
Development version
-------------------
+- Issue #317: `six.moves._dummy_thread` now points to the `_thread` module on
+ Python 3.9+. Python 3.7 and later requires threading and deprecated the
+ `_dummy_thread` module.
+
- Issue #308, pull request #314: Remove support for Python 2.6 and Python 3.2.
- Issue #250, issue #165, pull request #251: `six.wraps` now ignores missing
diff --git a/documentation/index.rst b/documentation/index.rst
index f4c90c9..e5e2994 100644
--- a/documentation/index.rst
+++ b/documentation/index.rst
@@ -591,7 +591,8 @@ Supported renames:
+------------------------------+-------------------------------------+---------------------------------------+
| ``dbm_ndbm`` | :mod:`py2:dbm` | :mod:`py3:dbm.ndbm` |
+------------------------------+-------------------------------------+---------------------------------------+
-| ``_dummy_thread`` | :mod:`py2:dummy_thread` | :mod:`py3:_dummy_thread` |
+| ``_dummy_thread`` | :mod:`py2:dummy_thread` | :mod:`py3:_dummy_thread` (< 3.9) |
+| | | :mod:`py3:_thread` (3.9+) |
+------------------------------+-------------------------------------+---------------------------------------+
| ``email_mime_base`` | :mod:`py2:email.MIMEBase` | :mod:`py3:email.mime.base` |
+------------------------------+-------------------------------------+---------------------------------------+
diff --git a/six.py b/six.py
index ecca823..e7d2dc3 100644
--- a/six.py
+++ b/six.py
@@ -259,7 +259,7 @@ _moved_attributes = [
MovedModule("copyreg", "copy_reg"),
MovedModule("dbm_gnu", "gdbm", "dbm.gnu"),
MovedModule("dbm_ndbm", "dbm", "dbm.ndbm"),
- MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread"),
+ MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread" if sys.version < (3, 9) else "_thread"),
MovedModule("http_cookiejar", "cookielib", "http.cookiejar"),
MovedModule("http_cookies", "Cookie", "http.cookies"),
MovedModule("html_entities", "htmlentitydefs", "html.entities"),