Skip to content

Commit

Permalink
[1.4.x] Fix an HTML-parser test that's failed in Python 2.6.8 since 5…
Browse files Browse the repository at this point in the history
…c79dd5.

The problem description in #18239 asserted that
http://bugs.python.org/issue670664 was fixed in Python 2.6.8, but based on
http://bugs.python.org/issue670664#msg146770 it appears that's not correct; the
fix was only applied in 2.7, 3.2, and Python trunk. Therefore we must use our
patched HTMLParser subclass in all Python 2.6 versions.

Backport of fcec904 from master. Fixes #19148.
  • Loading branch information
carljm authored and claudep committed Oct 23, 2012
1 parent e86e4ce commit ce168bb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions django/utils/html_parser.py
Expand Up @@ -5,8 +5,7 @@
current_version = sys.version_info

use_workaround = (
(current_version < (2, 6, 8)) or
(current_version >= (2, 7) and current_version < (2, 7, 3)) or
(current_version < (2, 7, 3)) or
(current_version >= (3, 0) and current_version < (3, 2, 3))
)

Expand Down

0 comments on commit ce168bb

Please sign in to comment.