This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年06月20日 09:42 by ezio.melotti, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue15114.diff | ezio.melotti, 2012年06月21日 14:50 | review | ||
| issue15114-2.diff | ezio.melotti, 2012年10月11日 12:00 | Patch for 3.4. | review | |
| issue15114-3.diff | ezio.melotti, 2013年11月07日 16:43 | Patch for 3.5. | review | |
| Messages (12) | |||
|---|---|---|---|
| msg163265 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2012年06月20日 09:42 | |
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). |
|||
| msg163273 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年06月20日 12:38 | |
Your plan sounds fine to me. |
|||
| msg163337 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2012年06月21日 14:50 | |
The attached patch include these changes: * strict=False default * strict arg deprecated in the doc * strict=True deprecated (raises a warning) * HTMLParseError deprecated in the doc * some calls to HTMLParser.error converted to asserts [0] Regarding * HTMLParser.error deprecated (raises a warning) I'm not sure anymore that's a good idea. The method is not documented, so in theory it could be removed without deprecation warnings, but that might break things if someone is using it. [0] 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) |
|||
| msg163570 - (view) | Author: Georg Brandl (georg.brandl) * (Python committer) | Date: 2012年06月23日 10:14 | |
Why not deprecate .error()? Removing it immediately as undocumented is certainly not better. Otherwise sounds good, please commit. |
|||
| msg163604 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2012年06月23日 13:21 | |
Regarding .error() I think the best thing to do is wait till 3.4 and then deprecate it. |
|||
| msg163605 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年06月23日 13:28 | |
New changeset 8dd2f5754b2f by Ezio Melotti in branch 'default': #15114: the strict mode of HTMLParser and the HTMLParseError exception are deprecated now that the parser is able to parse invalid markup. http://hg.python.org/cpython/rev/8dd2f5754b2f |
|||
| msg163608 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2012年06月23日 13:34 | |
3.3 is done. 3.4 strict arg deprecated (raises a warning) HTMLParser.error deprecated (raises a warning) 3.5 strict arg removed and strict code removed HTMLParseError removed HTMLParser.error and calls to HTMLParser.error removed |
|||
| msg201976 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2013年11月02日 15:08 | |
New changeset 0a56709eb798 by Ezio Melotti in branch 'default': #15114: The html.parser module now raises a DeprecationWarning when the strict argument of HTMLParser or the HTMLParser.error method are used. http://hg.python.org/cpython/rev/0a56709eb798 |
|||
| msg202363 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2013年11月07日 16:43 | |
3.4 is done. 3.5 strict arg removed and strict code removed HTMLParseError removed HTMLParser.error and calls to HTMLParser.error removed |
|||
| msg224551 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年08月02日 11:10 | |
New changeset 0e2e47c1f205 by Ezio Melotti in branch 'default': #15114: the strict mode and argument of HTMLParser, HTMLParser.error, and the HTMLParserError exception have been removed. http://hg.python.org/cpython/rev/0e2e47c1f205 |
|||
| msg224552 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2014年08月02日 11:13 | |
3.5 is done. Closing. |
|||
| msg224575 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年08月02日 15:54 | |
New changeset 5b95f3fdcc0b by Ezio Melotti in branch 'default': #15114, #21047: update whatsnew in Python 3.5. http://hg.python.org/cpython/rev/5b95f3fdcc0b |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:31 | admin | set | github: 59319 |
| 2014年08月02日 15:54:53 | python-dev | set | messages: + msg224575 |
| 2014年08月02日 11:13:18 | ezio.melotti | set | status: open -> closed resolution: fixed messages: + msg224552 stage: needs patch -> resolved |
| 2014年08月02日 11:10:49 | python-dev | set | messages: + msg224551 |
| 2014年07月05日 10:41:41 | berker.peksag | set | nosy:
+ berker.peksag versions: + Python 3.5, - Python 3.4 |
| 2014年02月14日 05:29:14 | ezio.melotti | link | issue20623 dependencies |
| 2013年11月07日 16:43:58 | ezio.melotti | set | files:
+ issue15114-3.diff messages: + msg202363 |
| 2013年11月02日 15:08:38 | python-dev | set | messages: + msg201976 |
| 2012年11月01日 20:43:48 | serhiy.storchaka | set | nosy:
- serhiy.storchaka |
| 2012年10月11日 12:00:11 | ezio.melotti | set | files:
+ issue15114-2.diff keywords: + patch |
| 2012年06月23日 17:24:12 | Arfrever | set | nosy:
+ Arfrever |
| 2012年06月23日 13:34:27 | ezio.melotti | set | priority: release blocker -> normal versions: + Python 3.4, - Python 3.3 messages: + msg163608 keywords: - patch stage: commit review -> needs patch |
| 2012年06月23日 13:28:01 | python-dev | set | nosy:
+ python-dev messages: + msg163605 |
| 2012年06月23日 13:21:43 | ezio.melotti | set | messages: + msg163604 |
| 2012年06月23日 10:14:52 | georg.brandl | set | messages: + msg163570 |
| 2012年06月22日 18:27:25 | ezio.melotti | set | stage: needs patch -> commit review |
| 2012年06月21日 14:50:15 | ezio.melotti | set | files:
+ issue15114.diff keywords: + patch messages: + msg163337 |
| 2012年06月20日 12:38:44 | r.david.murray | set | messages: + msg163273 |
| 2012年06月20日 10:01:34 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka |
| 2012年06月20日 09:42:50 | ezio.melotti | create | |