summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2019-08-27 02:48:06 (GMT)
committerGitHub <noreply@github.com>2019-08-27 02:48:06 (GMT)
commitfae0ed5099de594a9204071d555cb8b76368cbf4 (patch)
treed435837fb1b7f1fd76a84a1ba56592cc2873b809 /Lib
parent9a943b4ce13fac26873b8100e89c818c5c47ac4b (diff)
downloadcpython-fae0ed5099de594a9204071d555cb8b76368cbf4.zip
cpython-fae0ed5099de594a9204071d555cb8b76368cbf4.tar.gz
cpython-fae0ed5099de594a9204071d555cb8b76368cbf4.tar.bz2
bpo-37328: remove deprecated HTMLParser.unescape (GH-14186)
It is deprecated since Python 3.4.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/html/parser.py8
-rw-r--r--Lib/test/test_htmlparser.py7
2 files changed, 0 insertions, 15 deletions
diff --git a/Lib/html/parser.py b/Lib/html/parser.py
index de81879..6083077 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 @@ 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 --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py
index 326e342..a2bfb39 100644
--- a/Lib/test/test_htmlparser.py
+++ b/Lib/test/test_htmlparser.py
@@ -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 = '&quot;&#34;&#x22;&quot&#34&#x22&#bad;'
- self.assertEqual(p.unescape(s), unescape(s))
-
def test_broken_comments(self):
html = ('<! not really a comment >'
'<! not a comment either -->'