diff options
author | Claude Paroz <claude@2xlibre.net> | 2017-01-07 12:11:46 +0100 |
---|---|---|
committer | Claude Paroz <claude@2xlibre.net> | 2017-01-18 21:33:28 +0100 |
commit | 2b281cc35ed9d997614ca3c416928d7fabfef1ad (patch) | |
tree | d3e73cf44b15139aa9f1f53e398942ba64f5e190 /django/utils/text.py | |
parent | 7b2f2e74adb36a4334e83130f6abc2f79d395235 (diff) | |
download | django-2b281cc35ed9d997614ca3c416928d7fabfef1ad.tar.gz |
Refs #23919 -- Removed most of remaining six usage
Thanks Tim Graham for the review.
Diffstat (limited to 'django/utils/text.py')
-rw-r--r-- | django/utils/text.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/django/utils/text.py b/django/utils/text.py index 15a9b6160a..d716a0b345 100644 --- a/django/utils/text.py +++ b/django/utils/text.py @@ -1,15 +1,14 @@ +import html.entities import re import unicodedata from gzip import GzipFile from io import BytesIO -from django.utils import six from django.utils.encoding import force_text from django.utils.functional import ( SimpleLazyObject, keep_lazy, keep_lazy_text, lazy, ) from django.utils.safestring import SafeText, mark_safe -from django.utils.six.moves import html_entities from django.utils.translation import pgettext, ugettext as _, ugettext_lazy @@ -369,12 +368,12 @@ def _replace_entity(match): c = int(text[1:], 16) else: c = int(text) - return six.unichr(c) + return chr(c) except ValueError: return match.group(0) else: try: - return six.unichr(html_entities.name2codepoint[text]) + return chr(html.entities.name2codepoint[text]) except (ValueError, KeyError): return match.group(0) |