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/html_parser.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/html_parser.py')
-rw-r--r-- | django/utils/html_parser.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/django/utils/html_parser.py b/django/utils/html_parser.py index d272004f77..e3e19ee9c3 100644 --- a/django/utils/html_parser.py +++ b/django/utils/html_parser.py @@ -1,14 +1,14 @@ -from django.utils.six.moves import html_parser as _html_parser +import html.parser try: - HTMLParseError = _html_parser.HTMLParseError + HTMLParseError = html.parser.HTMLParseError except AttributeError: # create a dummy class for Python 3.5+ where it's been removed class HTMLParseError(Exception): pass -class HTMLParser(_html_parser.HTMLParser): +class HTMLParser(html.parser.HTMLParser): """Explicitly set convert_charrefs to be False. This silences a deprecation warning on Python 3.4, but we can't do @@ -16,4 +16,4 @@ class HTMLParser(_html_parser.HTMLParser): argument. """ def __init__(self, convert_charrefs=False, **kwargs): - _html_parser.HTMLParser.__init__(self, convert_charrefs=convert_charrefs, **kwargs) + html.parser.HTMLParser.__init__(self, convert_charrefs=convert_charrefs, **kwargs) |