From 58ecccbab82ac48b284243a21bce61ff6d03c2c0 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Sat, 27 Nov 2021 19:26:24 -0800 Subject: [PATCH 1/3] dummy_thread/ing: remove in 3.9 https://bugs.python.org/issue37312 --- stdlib/VERSIONS | 6 +++--- tests/check_consistent.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/stdlib/VERSIONS b/stdlib/VERSIONS index 28de7ec3f227..1efc2103b7f6 100644 --- a/stdlib/VERSIONS +++ b/stdlib/VERSIONS @@ -29,8 +29,8 @@ _compression: 3.6- _csv: 2.7- _curses: 2.7- _decimal: 3.6- -_dummy_thread: 3.6- -_dummy_threading: 2.7- +_dummy_thread: 3.6-3.8 +_dummy_threading: 2.7-3.8 _heapq: 2.7- _imp: 3.6- _json: 2.7- @@ -105,7 +105,7 @@ dis: 2.7- distutils: 2.7- distutils.command.bdist_msi: 2.7-3.10 doctest: 2.7- -dummy_threading: 2.7- +dummy_threading: 2.7-3.8 email: 2.7- encodings: 2.7- ensurepip: 2.7- diff --git a/tests/check_consistent.py b/tests/check_consistent.py index 2f7192bd8b2b..974c91da07ac 100755 --- a/tests/check_consistent.py +++ b/tests/check_consistent.py @@ -19,7 +19,6 @@ consistent_files = [ {"stdlib/@python2/builtins.pyi", "stdlib/@python2/__builtin__.pyi"}, - {"stdlib/threading.pyi", "stdlib/_dummy_threading.pyi"}, ] metadata_keys = {"version", "python2", "requires", "extra_description", "obsolete_since"} allowed_files = {"README.md"} From 45e4319f0f19353966cabf335b83ac8873da1ed5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 28 Nov 2021 03:28:10 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks --- tests/check_consistent.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/check_consistent.py b/tests/check_consistent.py index 974c91da07ac..659d5cb2fe9c 100755 --- a/tests/check_consistent.py +++ b/tests/check_consistent.py @@ -17,9 +17,7 @@ import tomli -consistent_files = [ - {"stdlib/@python2/builtins.pyi", "stdlib/@python2/__builtin__.pyi"}, -] +consistent_files = [{"stdlib/@python2/builtins.pyi", "stdlib/@python2/__builtin__.pyi"}] metadata_keys = {"version", "python2", "requires", "extra_description", "obsolete_since"} allowed_files = {"README.md"} From 123bea13fb86aadbc5fac0fb01cea05f51c9f0df Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Sat, 27 Nov 2021 20:35:18 -0800 Subject: [PATCH 3/3] fix for six --- stubs/six/six/moves/_dummy_thread.pyi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stubs/six/six/moves/_dummy_thread.pyi b/stubs/six/six/moves/_dummy_thread.pyi index 24879612a769..410232d07417 100644 --- a/stubs/six/six/moves/_dummy_thread.pyi +++ b/stubs/six/six/moves/_dummy_thread.pyi @@ -1 +1,6 @@ -from _dummy_thread import * +import sys + +if sys.version_info >= (3, 9): + from _thread import * +else: + from _dummy_thread import *