(original) (raw)
" % dtd, [('decl', 'DOCTYPE ' + dtd)]) - def test_declaration_junk_chars(self): - self._parse_error("") - def test_startendtag(self): self._run_check("
", [ ("startendtag", "p", []), @@ -421,23 +383,12 @@ self._run_check('no charrefs here', [('data', 'no charrefs here')], collector=collector()) - -class HTMLParserTolerantTestCase(HTMLParserStrictTestCase): - - def get_collector(self): - return EventCollector(convert_charrefs=False) - def test_deprecation_warnings(self): with self.assertWarns(DeprecationWarning): EventCollector() # convert_charrefs not passed explicitly - with self.assertWarns(DeprecationWarning): - EventCollector(strict=True) - with self.assertWarns(DeprecationWarning): - EventCollector(strict=False) - with self.assertRaises(html.parser.HTMLParseError): - with self.assertWarns(DeprecationWarning): - EventCollector().error('test') + # the remaining tests were for the "tolerant" parser (which is now + # the default), and check various kind of broken markup def test_tolerant_parsing(self): self._run_check('te>>xt&a<<bc< a="">\n' '", diff -r 02d6d3a7a181 -r 0e2e47c1f205 Misc/NEWS --- a/Misc/NEWS Sat Aug 02 01:30:37 2014 -0400 +++ b/Misc/NEWS Sat Aug 02 14:10:30 2014 +0300 @@ -121,6 +121,9 @@ Library ------- +- Issue #15114: the strict mode and argument of HTMLParser, HTMLParser.error, + and the HTMLParserError exception have been removed. + - Issue #22085: Dropped support of Tk 8.3 in Tkinter. - Issue #21580: Now Tkinter correctly handles bytes arguments passed to Tk.</bc<>