MNT: Remove dummy_threading because threading is always available - #23073
Conversation
With Python 3.7 and above, the threading module is always available.
|
Not positive, but it looks like they've removed their dummy_threading patches? Ping @rth for comment on whether this will break Pyodide because it looks like you did some of the threading work over in Pyodide. |
|
I also side-banded @mdboom , we are good to go here! Merging over the OSX failures which are due to tk installation issues. |
|
For Pyodide it should be OK, since indeed lately importing I think the only thing that could be improved is to add try:
timer.start()
except RuntimeError:
passin the FontManager init, as otherwise starting that thread would fail in Pyodide, >>> timer = threading.Timer(1, lambda x: print('a'))
>>> timer.start()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/lib/python3.10/threading.py", line 928, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread( |
|
Would changing the warning timer to I don't see a major issue with adding the try/except either, the only minor issue is that someone else will come along again next time and say it isn't necessary because the CPython docs say it should be available :) |

PR Summary
With Python 3.7 and above, the threading module is always available.
https://docs.python.org/3.7/library/dummy_threading.html
PR Checklist
Tests and Styling
pytestpasses).flake8-docstringsand runflake8 --docstring-convention=all).Documentation
doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).