From c47ed98b3eba2cbdc242e1652e846e54c82d3fb1 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Sat, 27 Nov 2021 20:50:14 -0800 Subject: [PATCH] dummy_thread/ing: remove in 3.9 (#6408) https://bugs.python.org/issue37312 --- stdlib/VERSIONS | 6 +++--- stubs/six/six/moves/_dummy_thread.pyi | 7 ++++++- tests/check_consistent.py | 5 +---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/stdlib/VERSIONS b/stdlib/VERSIONS index 28de7ec3f..1efc2103b 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/stubs/six/six/moves/_dummy_thread.pyi b/stubs/six/six/moves/_dummy_thread.pyi index 24879612a..410232d07 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 * diff --git a/tests/check_consistent.py b/tests/check_consistent.py index 2f7192bd8..659d5cb2f 100755 --- a/tests/check_consistent.py +++ b/tests/check_consistent.py @@ -17,10 +17,7 @@ import re import tomli -consistent_files = [ - {"stdlib/@python2/builtins.pyi", "stdlib/@python2/__builtin__.pyi"}, - {"stdlib/threading.pyi", "stdlib/_dummy_threading.pyi"}, -] +consistent_files = [{"stdlib/@python2/builtins.pyi", "stdlib/@python2/__builtin__.pyi"}] metadata_keys = {"version", "python2", "requires", "extra_description", "obsolete_since"} allowed_files = {"README.md"}