-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-37312: Remove _dummy_thread and dummy_threading modules #14143
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two more references. It seems there is a fixer in 2to3 to convert dummy_thread
to _dummy_thread
. Since it's being removed I guess its good to remove the import related fixes too.
Lib/lib2to3/fixes/fix_imports.py:35: 'dummy_thread': '_dummy_thread',
Lib/_compat_pickle.py:31: 'dummy_thread': '_dummy_thread',
2to3 renames dummy_thread
to _dummy_thread
but running the fixed program with this PR throws ImportError
➜ cpython git:(pr_14143) cat /tmp/foo.py
import dummy_thread
➜ cpython git:(pr_14143) ./python.exe Tools/scripts/2to3 /tmp/foo.py
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Refactored /tmp/foo.py
--- /tmp/foo.py (original)
+++ /tmp/foo.py (refactored)
@@ -1 +1 @@
-import dummy_thread
+import _dummy_thread
RefactoringTool: Files that need to be modified:
RefactoringTool: /tmp/foo.py
Yep, I kept them on purpose. At least, it helps to make code compatible with Python 3.7. |
Remove _dummy_thread and dummy_threading modules. These modules were deprecated since Python 3.7 which requires threading support.
PR rebased to handle a conflict. |
Thanks for the review @methane. Tests pass, I merged my PR. |
…-14143) Remove _dummy_thread and dummy_threading modules. These modules were deprecated since Python 3.7 which requires threading support.
…-14143) Remove _dummy_thread and dummy_threading modules. These modules were deprecated since Python 3.7 which requires threading support.
I hope it will unblock the GitHub built-in merge resolver.
Remove _dummy_thread and dummy_threading modules. These modules
were deprecated since Python 3.7 which requires threading support.
https://bugs.python.org/issue37312