diff --git a/Lib/html/parser.py b/Lib/html/parser.py index de81879a631ac7..60830779816a03 100644 --- a/Lib/html/parser.py +++ b/Lib/html/parser.py @@ -9,7 +9,6 @@ import re -import warnings import _markupbase from html import unescape @@ -461,10 +460,3 @@ def handle_pi(self, data): 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 --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py index 326e34290ff13b..a2bfb39d16a571 100644 --- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -573,13 +573,6 @@ def test_EOF_in_charref(self): 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 = ('' '' diff --git a/Misc/NEWS.d/next/Library/2019-06-18-15-31-33.bpo-37328.2PW1-l.rst b/Misc/NEWS.d/next/Library/2019-06-18-15-31-33.bpo-37328.2PW1-l.rst new file mode 100644 index 00000000000000..d91ab1b295d371 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-06-18-15-31-33.bpo-37328.2PW1-l.rst @@ -0,0 +1,2 @@ +``HTMLParser.unescape`` is removed. It was undocumented and deprecated +since Python 3.4.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: