[issue5637] 2to3 does not convert urllib.urlopen to urllib.request.urlopen
Senthil
report at bugs.python.org
Wed Apr 1 03:57:02 CEST 2009
New submission from Senthil <orsenthil at gmail.com>:
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
----------
messages: 84956
nosy: orsenthil
severity: normal
status: open
title: 2to3 does not convert urllib.urlopen to urllib.request.urlopen
type: behavior
versions: Python 3.1
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5637>
_______________________________________
More information about the Python-bugs-list
mailing list