With django now supporting async, should we be trying to import asgiref.local.Local if available, which is a drop-in async replacement for threading.local?
Perhaps replacing:
from threading import local
With:
try:
from asgiref.local import Local as local
except ImportError:
from threading import local
Would be happy to make a PR for this, but not sure how to approach the situation where asgiref package is available vs when it is not.
With django now supporting async, should we be trying to import asgiref.local.Local if available, which is a drop-in async replacement for threading.local?
Perhaps replacing:
from threading import local
With:
Would be happy to make a PR for this, but not sure how to approach the situation where asgiref package is available vs when it is not.