summaryrefslogtreecommitdiff
path: root/django/urls
diff options
context:
space:
mode:
authorHasan Ramezani <hasan.r67@gmail.com>2019-10-26 16:42:32 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-10-29 09:22:26 +0100
commite3d0b4d5501c6d0bc39f035e4345e5bdfde12e41 (patch)
treea8ddbafdf4a38a87df6f65fc4d02dba08c725096 /django/urls
parent39a34d4bf94bc8325119bc23b64f3a041a85dd2d (diff)
Fixed #30899 -- Lazily compiled import time regular expressions.
Diffstat (limited to 'django/urls')
-rw-r--r--django/urls/resolvers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/urls/resolvers.py b/django/urls/resolvers.py
index 2ff8b2c775..2d4610aac4 100644
--- a/django/urls/resolvers.py
+++ b/django/urls/resolvers.py
@@ -21,7 +21,7 @@ from django.core.exceptions import ImproperlyConfigured, ViewDoesNotExist
from django.utils.datastructures import MultiValueDict
from django.utils.functional import cached_property
from django.utils.http import RFC3986_SUBDELIMS, escape_leading_slashes
-from django.utils.regex_helper import normalize
+from django.utils.regex_helper import _lazy_re_compile, normalize
from django.utils.translation import get_language
from .converters import get_converter
@@ -195,7 +195,7 @@ class RegexPattern(CheckURLMixin):
return str(self._regex)
-_PATH_PARAMETER_COMPONENT_RE = re.compile(
+_PATH_PARAMETER_COMPONENT_RE = _lazy_re_compile(
r'<(?:(?P<converter>[^>:]+):)?(?P<parameter>\w+)>'
)