summaryrefslogtreecommitdiff
path: root/django/urls/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/urls/base.py')
-rw-r--r--django/urls/base.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/django/urls/base.py b/django/urls/base.py
index 1200d9a25b..0e1c3d909c 100644
--- a/django/urls/base.py
+++ b/django/urls/base.py
@@ -1,6 +1,7 @@
-from threading import local
from urllib.parse import urlsplit, urlunsplit
+from asgiref.local import Local
+
from django.utils.encoding import iri_to_uri
from django.utils.functional import lazy
from django.utils.translation import override
@@ -12,10 +13,10 @@ from .utils import get_callable
# SCRIPT_NAME prefixes for each thread are stored here. If there's no entry for
# the current thread (which is the only one we ever access), it is assumed to
# be empty.
-_prefixes = local()
+_prefixes = Local()
# Overridden URLconfs for each thread are stored here.
-_urlconfs = local()
+_urlconfs = Local()
def resolve(path, urlconf=None):