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 - does not translate urllib2 to urllib.request correctly for function/method argument
Type: behavior Stage:
Components: 2to3 (2.x to 3.x conversion tool) Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: benjamin.peterson Nosy List: benjamin.peterson, orsenthil
Priority: normal Keywords:

Created on 2009-11-22 15:40 by orsenthil, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg95602 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2009-11-22 15:40
2.x code:

import urllib2
opener = urllib2.build_opener(urllib2.HTTPHandler(debuglevel=1))

2to3 on this would result in:

import urllib.request, urllib.error, urllib.parse
opener = urllib.request.build_opener(urllib2.HTTPHandler(debuglevel=1))

which is wrong. It did not translate the urllib2 in argument.
msg95610 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-11-23 00:17
Fixed in r76447.
History
Date User Action Args
2022-04-11 14:56:55adminsetgithub: 51624
2009-12-15 22:02:57r.david.murraylinkissue7520 superseder
2009-11-23 00:17:58benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg95610
2009-11-22 15:40:45orsenthilsetcomponents: + 2to3 (2.x to 3.x conversion tool)
2009-11-22 15:40:32orsenthilcreate