python-elasticsearch-logger icon indicating copy to clipboard operation
python-elasticsearch-logger copied to clipboard

threading.Thread.setDaemon has been deprecated in favor of setting daemon attribute directly in Python 3.10

Open tirkarthi opened this issue 3 years ago • 1 comments

Timer inherits from threading.Thread . Ref : python/cpython#25174

https://github.com/cmanaha/python-elasticsearch-logger/blob/27ee809b4eba309d198a8909d9c559754e257197/cmreslogging/handlers.py#L208

/root/checked_repos/python-elasticsearch-logger/cmreslogging/handlers.py:208: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
  self._timer.setDaemon(True)

tirkarthi avatar May 08 '21 05:05 tirkarthi

python3.10 abandon this usage "setDaemon(True) ", you can use "self._timer.daemon = True " to replace

qiuweb avatar Sep 16 '22 01:09 qiuweb