Issue #18200: Update the stdlib (except tests) to use
ModuleNotFoundError.
diff --git a/Lib/_strptime.py b/Lib/_strptime.py
index 7520919..7724d87 100644
--- a/Lib/_strptime.py
+++ b/Lib/_strptime.py
@@ -21,7 +21,7 @@
                       timezone as datetime_timezone)
 try:
     from _thread import allocate_lock as _thread_allocate_lock
-except ImportError:
+except ModuleNotFoundError:
     from _dummy_thread import allocate_lock as _thread_allocate_lock
 
 __all__ = []