mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
python: remove API deprecated in Python 3.10
This commit is contained in:
@@ -40,7 +40,7 @@ class FFIEventLogger:
|
|||||||
|
|
||||||
@account_hookimpl
|
@account_hookimpl
|
||||||
def ac_log_line(self, message):
|
def ac_log_line(self, message):
|
||||||
t = threading.currentThread()
|
t = threading.current_thread()
|
||||||
tname = getattr(t, "name", t)
|
tname = getattr(t, "name", t)
|
||||||
if tname == "MainThread":
|
if tname == "MainThread":
|
||||||
tname = "MAIN"
|
tname = "MAIN"
|
||||||
@@ -193,7 +193,7 @@ class EventThread(threading.Thread):
|
|||||||
def __init__(self, account) -> None:
|
def __init__(self, account) -> None:
|
||||||
self.account = account
|
self.account = account
|
||||||
super(EventThread, self).__init__(name="events")
|
super(EventThread, self).__init__(name="events")
|
||||||
self.setDaemon(True)
|
self.daemon = True
|
||||||
self._marked_for_shutdown = False
|
self._marked_for_shutdown = False
|
||||||
self.start()
|
self.start()
|
||||||
|
|
||||||
|
|||||||
@@ -465,7 +465,7 @@ class BotProcess:
|
|||||||
# the (unicode) lines available for readers through a queue.
|
# the (unicode) lines available for readers through a queue.
|
||||||
self.stdout_queue = queue.Queue()
|
self.stdout_queue = queue.Queue()
|
||||||
self.stdout_thread = t = threading.Thread(target=self._run_stdout_thread, name="bot-stdout-thread")
|
self.stdout_thread = t = threading.Thread(target=self._run_stdout_thread, name="bot-stdout-thread")
|
||||||
t.setDaemon(True)
|
t.daemon = True
|
||||||
t.start()
|
t.start()
|
||||||
|
|
||||||
def _run_stdout_thread(self) -> None:
|
def _run_stdout_thread(self) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user