halo icon indicating copy to clipboard operation
halo 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 4 years ago • 1 comments

Description

Ref : https://github.com/python/cpython/pull/25174

System settings

  • Operating System:
  • Terminal in use:
  • Python version: 3.10
  • Halo version:
  • pip freeze output:

Error

halo/halo/halo.py:        self._spinner_thread.setDaemon(True)
halo/halo/halo_notebook.py:        self._spinner_thread.setDaemon(True)

Expected behaviour

Set daemon attribute directly

tirkarthi avatar May 07 '21 18:05 tirkarthi

Encounter this annoying DeprecationWarning also every time we run our custom script:

/opt/homebrew/Caskroom/miniforge/base/envs/py311/lib/python3.11/site-packages/halo/halo.py:497: 
DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
  self._spinner_thread.setDaemon(True)

I'm using Py3.11. Hopefully, the related PRs could be merged soon. :)

ranelpadon avatar Mar 23 '23 14:03 ranelpadon