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.

classification
Title: 2to3 should fix "import HTMLParser"
Type: behavior Stage:
Components: 2to3 (2.x to 3.x conversion tool) Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: LambertDW, benjamin.peterson, mastrodomenico
Priority: normal Keywords:

Created on 2008-12-11 15:47 by mastrodomenico, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg77618 - (view) Author: Lino Mastrodomenico (mastrodomenico) Date: 2008-12-11 15:47
This should be easy: 2to3 must convert "import HTMLParser" to "import
html.parser".
msg77624 - (view) Author: David W. Lambert (LambertDW) Date: 2008-12-11 18:11
It is hard.  Although you know what you mean, 2to3 has no way to know
for instance, that you never run your program with working directory
containing file HTMLParser.py.

2to3 could offer a suggestion rather than reporting no change required.
 This issue is common.
msg77626 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-12-11 19:18
We do have a fixer that changes imports from std reorg. I added
HTMLParser and htmlentitydefs in r67706.
History
Date User Action Args
2022-04-11 14:56:42adminsetgithub: 48884
2008-12-11 19:18:20benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg77626
nosy: + benjamin.peterson
2008-12-11 18:11:29LambertDWsetnosy: + LambertDW
messages: + msg77624
2008-12-11 15:47:21mastrodomenicocreate