Deprecate strict mode of HTMLParser #59319
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee = 'https://github.com/ezio-melotti' closed_at = <Date 2014-08-02.11:13:18.985> created_at = <Date 2012-06-20.09:42:50.624> labels = ['type-bug', 'library'] title = 'Deprecate strict mode of HTMLParser' updated_at = <Date 2014-08-02.15:54:53.660> user = 'https://github.com/ezio-melotti'
activity = <Date 2014-08-02.15:54:53.660> actor = 'python-dev' assignee = 'ezio.melotti' closed = True closed_date = <Date 2014-08-02.11:13:18.985> closer = 'ezio.melotti' components = ['Library (Lib)'] creation = <Date 2012-06-20.09:42:50.624> creator = 'ezio.melotti' dependencies =  files = ['26067', '27528', '32535'] hgrepos =  issue_num = 15114 keywords = ['patch'] message_count = 12.0 messages = ['163265', '163273', '163337', '163570', '163604', '163605', '163608', '201976', '202363', '224551', '224552', '224575'] nosy_count = 7.0 nosy_names = ['georg.brandl', 'ezio.melotti', 'eric.araujo', 'Arfrever', 'r.david.murray', 'python-dev', 'berker.peksag'] pr_nums =  priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = 'behavior' url = 'https://bugs.python.org/issue15114' versions = ['Python 3.5']
The text was updated successfully, but these errors were encountered:
The deprecation plan for the strict mode of HTMLParser might be as follow:
3.3 (before the beta)
Everything that is parsed by strict=True is parsed by strict=False too, so changing the default shouldn't be a problem. The difference is that strict=False won't raise any error and will parse broken markup too. Given that no errors are raised HTMLParseError and HTMLParser.error become useless and can be deprecated (3.3) and removed (3.5) too.
The attached patch include these changes:
 I made a mistake in my first message: some of the calls should actually be converted to assert, the others will stay as long as the strict mode exists (i.e. they will be removed in 3.5)