Rename thread to _thread and dummy_thread to _dummy_thread. Issue #2875.
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index df5ce0b..6c87645 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -22,13 +22,13 @@
         idents = []
 
         def callback():
-            idents.append(thread.get_ident())
+            idents.append(_thread.get_ident())
 
         _testcapi._test_thread_state(callback)
         a = b = callback
         time.sleep(1)
         # Check our main thread is in the list exactly 3 times.
-        if idents.count(thread.get_ident()) != 3:
+        if idents.count(_thread.get_ident()) != 3:
             raise support.TestFailed(
                         "Couldn't find main thread correctly in the list")
 
@@ -39,11 +39,11 @@
         have_thread_state = False
 
     if have_thread_state:
-        import thread
+        import _thread
         import time
         TestThreadState()
         import threading
-        t=threading.Thread(target=TestThreadState)
+        t = threading.Thread(target=TestThreadState)
         t.start()
         t.join()