[New-bugs-announce] [issue15114] Deprecate strict mode of HTMLParser

Ezio Melotti report at bugs.python.org
Wed Jun 20 11:42:51 CEST 2012


New submission from Ezio Melotti <ezio.melotti at gmail.com>:

The deprecation plan for the strict mode of HTMLParser might be as follow:

3.3 (before the beta)
strict=False default
strict arg deprecated in the doc
strict=True deprecated (raises a warning)
HTMLParseError deprecated
HTMLParser.error deprecated (raises a warning)
calls to HTMLParser.error removed/converted to asserts

3.4
strict arg deprecated (raises a warning)

3.5
strict arg removed and strict code removed
HTMLParseError removed
HTMLParser.error removed


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.
Once strict=False is the default (3.3), the instances should be created simply with HTMLParser(), and eventually the strict argument will be deprecated (3.4) and removed (3.5).

----------
assignee: ezio.melotti
components: Library (Lib)
messages: 163265
nosy: eric.araujo, ezio.melotti, georg.brandl, r.david.murray
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Deprecate strict mode of HTMLParser
type: behavior
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15114>
_______________________________________


More information about the New-bugs-announce mailing list