Rename thread to _thread and dummy_thread to _dummy_thread. Issue #2875.
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index 1041c14..2caa56a 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -52,9 +52,9 @@
 
 
 try:
-    import thread as _thread
+    import _thread
 except ImportError:
-    import dummy_thread as _thread
+    import _dummy_thread as _thread
 _allocate_lock = _thread.allocate_lock
 
 _text_openflags = _os.O_RDWR | _os.O_CREAT | _os.O_EXCL