As far back as Django 1.4 (didn't check earlier), we use both these patterns in the code:
import threading
try:
import threading
except ImportError:
import dummy_threading as threading
We also have logic in tests to skip if threading isn't available, however, I can't believe that Django is usable without threading given we use the first style of import (without a fallback) in many places (db.models.loading, db.utils, test.testcases, + more).
Docs say:
"The
dummy_threading module is provided for situations where
threading cannot be used because
thread is missing."
https://docs.python.org/2/library/threading.html"The [thread] module is optional. It is supported on Windows, Linux, SGI IRIX, Solaris
2.x, as well as on systems that have a POSIX thread (a.k.a. “pthread”)
implementation."
https://docs.python.org/2/library/thread.html#module-threadThis doesn't answer the question of what systems it *is* needed on. Unless there's an objection, I think we can remove dummy_threading fallbacks?