mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #30899 -- Lazily compiled import time regular expressions.
This commit is contained in:
committed by
Mariusz Felisiak
parent
39a34d4bf9
commit
e3d0b4d550
@@ -7,10 +7,11 @@ from django.db.backends.base.introspection import (
|
||||
BaseDatabaseIntrospection, FieldInfo as BaseFieldInfo, TableInfo,
|
||||
)
|
||||
from django.db.models.indexes import Index
|
||||
from django.utils.regex_helper import _lazy_re_compile
|
||||
|
||||
FieldInfo = namedtuple('FieldInfo', BaseFieldInfo._fields + ('pk',))
|
||||
|
||||
field_size_re = re.compile(r'^\s*(?:var)?char\s*\(\s*(\d+)\s*\)\s*$')
|
||||
field_size_re = _lazy_re_compile(r'^\s*(?:var)?char\s*\(\s*(\d+)\s*\)\s*$')
|
||||
|
||||
|
||||
def get_field_size(name):
|
||||
|
||||
Reference in New Issue
Block a user