Rename thread to _thread and dummy_thread to _dummy_thread. Issue #2875.
diff --git a/Lib/mimetools.py b/Lib/mimetools.py
index 0112f48..3ea5e1b 100644
--- a/Lib/mimetools.py
+++ b/Lib/mimetools.py
@@ -96,11 +96,11 @@
 # -----------------
 
 try:
-    import thread
+    import _thread
 except ImportError:
-    import dummy_thread as thread
-_counter_lock = thread.allocate_lock()
-del thread
+    import _dummy_thread as _thread
+_counter_lock = _thread.allocate_lock()
+del _thread
 
 _counter = 0
 def _get_next_counter():