diff -r 816e1fe72c1e Doc/whatsnew/3.6.rst --- a/Doc/whatsnew/3.6.rst Sun May 15 13:21:25 2016 +0000 +++ b/Doc/whatsnew/3.6.rst Sun May 15 22:03:21 2016 +0300 @@ -489,6 +489,11 @@ API and Feature Removals :mod:`traceback` module. They were undocumented methods deprecated since Python 3.2 and equivalent functionality is available from private methods. +* The ``unescape()`` method in the :class:`html.parser.HTMLParser` class + was removed (was deprecated since Python 3.4). :func:`html.unescape` + should be used for converting character references to the corresponding + unicode characters. + Porting to Python 3.6 ===================== diff -r 816e1fe72c1e Lib/html/parser.py --- a/Lib/html/parser.py Sun May 15 13:21:25 2016 +0000 +++ b/Lib/html/parser.py Sun May 15 22:03:21 2016 +0300 @@ -461,10 +461,3 @@ class HTMLParser(_markupbase.ParserBase) def unknown_decl(self, data): pass - - # Internal -- helper to remove special character quoting - def unescape(self, s): - warnings.warn('The unescape method is deprecated and will be removed ' - 'in 3.5, use html.unescape() instead.', - DeprecationWarning, stacklevel=2) - return unescape(s) diff -r 816e1fe72c1e Lib/test/test_htmlparser.py --- a/Lib/test/test_htmlparser.py Sun May 15 13:21:25 2016 +0000 +++ b/Lib/test/test_htmlparser.py Sun May 15 22:03:21 2016 +0300 @@ -573,13 +573,6 @@ text for html, expected in data: self._run_check(html, expected) - def test_unescape_method(self): - from html import unescape - p = self.get_collector() - with self.assertWarns(DeprecationWarning): - s = '""""""&#bad;' - self.assertEqual(p.unescape(s), unescape(s)) - def test_broken_comments(self): html = ('' ''