bpo-43723: Fix deprecation error caused by thread.setDaemon() (GH-25361)

This commit is contained in:
Christian Heimes 2021-04-12 13:12:36 +02:00 committed by GitHub
parent 3447750073
commit 95bbb331ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View file

@ -29,7 +29,7 @@ class GeneralTests(unittest.TestCase):
self.sock.settimeout(60) # Safety net. Look issue 11812
self.port = socket_helper.bind_port(self.sock)
self.thread = threading.Thread(target=server, args=(self.evt,self.sock))
self.thread.setDaemon(True)
self.thread.daemon = True
self.thread.start()
self.evt.wait()