Thanks to Detlef Lannert for pointing out a typo in the code that
uses _DummyMutex on platforms without threads.
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index 99177f5..b981084 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -249,7 +249,7 @@
         release = acquire
 
     _counter = _ThreadSafeCounter(_DummyMutex())
-    _tempdir_lock = _DummyMutes()
+    _tempdir_lock = _DummyMutex()
     del _DummyMutex
 
 else: