Issue #20753: Skip PasswordProtectedSiteTestCase when Python is built without threads.
diff --git a/Lib/test/test_robotparser.py b/Lib/test/test_robotparser.py
index 68a5e9c..d01266f 100644
--- a/Lib/test/test_robotparser.py
+++ b/Lib/test/test_robotparser.py
@@ -4,8 +4,11 @@
 from urllib.error import URLError, HTTPError
 from urllib.request import urlopen
 from test import support
-import threading
 from http.server import BaseHTTPRequestHandler, HTTPServer
+try:
+    import threading
+except ImportError:
+    threading = None
 
 
 class RobotTestCase(unittest.TestCase):
@@ -259,6 +262,7 @@
         pass
 
 
+@unittest.skipUnless(threading, 'threading required for this test')
 class PasswordProtectedSiteTestCase(unittest.TestCase):
 
     def setUp(self):