Skip to content

Commit

Permalink
Use the daemon attribute instead of setDaemon
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
evverx authored and gpotter2 committed Mar 26, 2023
1 parent 6ed050e commit 55cc32c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/tls/tests_tls_netaccess.uts
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ def test_tls_server(suite="", version="", tls13=False, client_auth=False, psk=No
q_ = Queue()
th_ = threading.Thread(target=run_tls_test_server, args=(msg, q_),
kwargs={"curve": None, "cookie": False, "client_auth": client_auth, "psk": psk},
name="test_tls_server %s %s" % (suite, version))
th_.setDaemon(True)
name="test_tls_server %s %s" % (suite, version), daemon=True)
th_.start()
# Synchronise threads
q_.get()
Expand Down Expand Up @@ -254,8 +253,7 @@ def test_tls_client(suite, version, curve=None, cookie=False, client_auth=False,
th_ = threading.Thread(target=run_tls_test_server, args=(msg, q_),
kwargs={"curve": None, "cookie": False, "client_auth": client_auth,
"handle_session_ticket": sess_in_out},
name="test_tls_client %s %s" % (suite, version))
th_.setDaemon(True)
name="test_tls_client %s %s" % (suite, version), daemon=True)
th_.start()
# Synchronise threads
print("Syncrhonising...")
Expand Down

0 comments on commit 55cc32c

Please sign in to comment.