#18239: Only use custom subclass of HTMLParser for Python versions with buggy
stdlib HTMLParser
----------------------------------------+------------------------
               Reporter:  carljm        |          Owner:  nobody
                   Type:  Bug           |         Status:  new
              Component:  Core (Other)  |        Version:  1.3
               Severity:  Normal        |       Keywords:
           Triage Stage:  Accepted      |      Has patch:  0
    Needs documentation:  0             |    Needs tests:  0
Patch needs improvement:  0             |  Easy pickings:  0
                  UI/UX:  0             |
----------------------------------------+------------------------
 Django currently has its own subclass of `HTMLParser` (in
 `django.utils.html_parser.HTMLParser`). It exists in order to patch
 [http://bugs.python.org/issue670664 a bug] in the standard library's
 `HTMLParser` in Python 2.5 and older versions of 2.6 and 2.7. The bug has
 been fixed in Python 2.6.8, 2.7.3, and will be fixed in the upcoming 3.3
 as well. There are also other fixes in 3.3's `HTMLParser` which conflict
 with the patched version in Django, since it relies on numerous
 undocumented internals.

 For better forward-compatibility, we should only use our patched subclass
 for versions of Python known to contain the bug, and otherwise simply use
 the standard library's `HTMLParser` directly.

 When we make this change, we can also roll back r17456, as that was simply
 papering over a breakage due to the modified `HTMLParser` in 2.6.8 and
 2.7.3 - that will no longer be a problem if we don't try to use our
 subclass with those (and newer) Pythons.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18239>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to