From 4160a7e2ec5cb7abf539b50f574b2e0ae8235dfb Mon Sep 17 00:00:00 2001 From: Linmiao Xu Date: Thu, 24 Nov 2022 19:47:45 -0500 Subject: [PATCH] Fix warnings about thread.setDaemon() in python 3.10+ easy_train.py:316: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead thread.setDaemon(True) camelCase methods in threading were deprecated in: https://github.com/python/cpython/pull/25174 --- scripts/easy_train.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/easy_train.py b/scripts/easy_train.py index 012f872f..d0ed61b4 100644 --- a/scripts/easy_train.py +++ b/scripts/easy_train.py @@ -313,7 +313,7 @@ def f(): os._exit(errcode) thread = Thread(target=f) - thread.setDaemon(True) + thread.daemon = True thread.start() if sys.platform == "win32": @@ -499,7 +499,7 @@ def __init__(self, period_seconds): self._running = True self._update() - self.setDaemon(True) + self.daemon = True self.start() def _update(self): @@ -2410,7 +2410,7 @@ def f(): time.sleep(1) thread = Thread(target=f) - thread.setDaemon(True) + thread.daemon = True thread.start() def main():