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 convert urllib.urlopen to urllib.request.urlopen
Type: behavior Stage:
Components: Versions: Python 3.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: benjamin.peterson Nosy List: benjamin.peterson, orsenthil
Priority: normal Keywords:

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

Messages (2)
msg84956 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2009-04-01 01:57
In Py2x, have this code:

import urllib
s = urllib.urlopen('http://www.python.org')
print s

Run 2to3, on this, refactoring works only on import urllib and print
statements.

@@ -1,3 +1,3 @@
-import urllib
+import urllib.request, urllib.parse, urllib.error
 s = urllib.urlopen('http://www.python.org')
-print s
+print(s)

There urllib.urlopen, needs to be refactored into urllib.request.urlopen
msg85090 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-04-01 20:54
Fixed in r70991.
History
Date User Action Args
2022-04-11 14:56:47adminsetgithub: 49887
2009-04-01 20:54:59benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg85090
2009-04-01 14:52:46georg.brandlsetassignee: benjamin.peterson

nosy: + benjamin.peterson
2009-04-01 01:57:00orsenthilcreate