manrajgrover / halo

💫 Beautiful spinners for terminal, IPython and Jupyter
MIT License
2.86k stars 148 forks source link

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

Open tirkarthi opened 3 years ago

tirkarthi commented 3 years ago

Description

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

System settings

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

ranelpadon commented 1 year ago

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. :)