]> granicus.if.org Git - python/commitdiff
Closes #13140: Fix the daemon_threads attribute of ThreadingMixIn.
authorFlorent Xicluna <florent.xicluna@gmail.com>
Fri, 4 Nov 2011 09:16:28 +0000 (10:16 +0100)
committerFlorent Xicluna <florent.xicluna@gmail.com>
Fri, 4 Nov 2011 09:16:28 +0000 (10:16 +0100)
Lib/socketserver.py
Lib/test/test_socketserver.py
Misc/NEWS

index 0e2ba83d1d66250b552fcceaafe67b3c4c2f914c..cd367f15e2d3105e54adaf739ef9643d42510e70 100644 (file)
@@ -588,8 +588,7 @@ class ThreadingMixIn:
         """Start a new thread to process the request."""
         t = threading.Thread(target = self.process_request_thread,
                              args = (request, client_address))
-        if self.daemon_threads:
-            t.daemon = True
+        t.daemon = self.daemon_threads
         t.start()
 
 
index 08d79c01f36e55d6995090a874d911a076f5b386..b3660c1e6cf10e88d578fbced077de1070ee1107 100644 (file)
@@ -123,7 +123,6 @@ class SocketServerTest(unittest.TestCase):
         self.assertEqual(server.server_address, server.socket.getsockname())
         return server
 
-    @unittest.skipUnless(threading, 'Threading required for this test.')
     @reap_threads
     def run_server(self, svrcls, hdlrbase, testfunc):
         server = self.make_server(self.pickaddr(svrcls.address_family),
index a605909c3d8da786039a028634b75449acb72837..c91c094a2fa489605593127dda5822602b83a2db 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -66,6 +66,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #13140: Fix the daemon_threads attribute of ThreadingMixIn.
+
 - Issue #13339: Fix compile error in posixmodule.c due to missing semicolon.
   Thanks to Robert Xiao.