Skip to content

Commit 55cc32c

Browse files
evverxgpotter2
authored andcommitted
Use the daemon attribute instead of setDaemon
setDaemon was deprecated in python/cpython#25174 Fixes: ``` >>> test_tls_server("ECDHE-RSA-AES128-SHA", "-tls1") Traceback (most recent call last): File "<input>", line 2, in <module> File "<input>", line 9, in test_tls_server File "/usr/lib64/python3.11/threading.py", line 1240, in setDaemon warnings.warn('setDaemon() is deprecated, set the daemon attribute instead', DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead ```
1 parent 6ed050e commit 55cc32c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/tls/tests_tls_netaccess.uts

+2-4
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ def test_tls_server(suite="", version="", tls13=False, client_auth=False, psk=No
145145
q_ = Queue()
146146
th_ = threading.Thread(target=run_tls_test_server, args=(msg, q_),
147147
kwargs={"curve": None, "cookie": False, "client_auth": client_auth, "psk": psk},
148-
name="test_tls_server %s %s" % (suite, version))
149-
th_.setDaemon(True)
148+
name="test_tls_server %s %s" % (suite, version), daemon=True)
150149
th_.start()
151150
# Synchronise threads
152151
q_.get()
@@ -254,8 +253,7 @@ def test_tls_client(suite, version, curve=None, cookie=False, client_auth=False,
254253
th_ = threading.Thread(target=run_tls_test_server, args=(msg, q_),
255254
kwargs={"curve": None, "cookie": False, "client_auth": client_auth,
256255
"handle_session_ticket": sess_in_out},
257-
name="test_tls_client %s %s" % (suite, version))
258-
th_.setDaemon(True)
256+
name="test_tls_client %s %s" % (suite, version), daemon=True)
259257
th_.start()
260258
# Synchronise threads
261259
print("Syncrhonising...")

0 commit comments

Comments
 (0)