New submission from Senthil <[email protected]>:
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 <[email protected]>
<http://bugs.python.org/issue5637>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com