summaryrefslogtreecommitdiff
path: root/django/utils/text.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-01-07 12:11:46 +0100
committerClaude Paroz <claude@2xlibre.net>2017-01-18 21:33:28 +0100
commit2b281cc35ed9d997614ca3c416928d7fabfef1ad (patch)
treed3e73cf44b15139aa9f1f53e398942ba64f5e190 /django/utils/text.py
parent7b2f2e74adb36a4334e83130f6abc2f79d395235 (diff)
downloaddjango-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.py7
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)