1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Refs #23919 -- Removed re.U and re.UNICODE (default on Python 3).

This commit is contained in:
Mariusz Felisiak
2017-01-18 22:52:25 +01:00
committed by Tim Graham
parent 990ce6386c
commit c22212220a
7 changed files with 23 additions and 19 deletions

View File

@@ -522,7 +522,7 @@ class RegexField(CharField):
def _set_regex(self, regex):
if isinstance(regex, str):
regex = re.compile(regex, re.UNICODE)
regex = re.compile(regex)
self._regex = regex
if hasattr(self, '_regex_validator') and self._regex_validator in self.validators:
self.validators.remove(self._regex_validator)