diff --git a/python/src/deltachat/events.py b/python/src/deltachat/events.py index e0e1c3348..4030cd029 100644 --- a/python/src/deltachat/events.py +++ b/python/src/deltachat/events.py @@ -40,7 +40,7 @@ class FFIEventLogger: @account_hookimpl def ac_log_line(self, message): - t = threading.currentThread() + t = threading.current_thread() tname = getattr(t, "name", t) if tname == "MainThread": tname = "MAIN" @@ -193,7 +193,7 @@ class EventThread(threading.Thread): def __init__(self, account) -> None: self.account = account super(EventThread, self).__init__(name="events") - self.setDaemon(True) + self.daemon = True self._marked_for_shutdown = False self.start() diff --git a/python/src/deltachat/testplugin.py b/python/src/deltachat/testplugin.py index 7ed48f96a..a1095befd 100644 --- a/python/src/deltachat/testplugin.py +++ b/python/src/deltachat/testplugin.py @@ -465,7 +465,7 @@ class BotProcess: # the (unicode) lines available for readers through a queue. self.stdout_queue = queue.Queue() self.stdout_thread = t = threading.Thread(target=self._run_stdout_thread, name="bot-stdout-thread") - t.setDaemon(True) + t.daemon = True t.start() def _run_stdout_thread(self) -> None: