halo
halo copied to clipboard
threading.Thread.setDaemon has been deprecated in favor of setting daemon attribute directly in Python 3.10
Description
Ref : https://github.com/python/cpython/pull/25174
System settings
- Operating System:
- Terminal in use:
- Python version: 3.10
- Halo version:
pip freezeoutput:
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
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. :)