[New-bugs-announce] [issue7375] 2to3 - does not translate urllib2 to urllib.request correctly for function/method argument

Senthil Kumaran report at bugs.python.org
Sun Nov 22 16:40:33 CET 2009


New submission from Senthil Kumaran <orsenthil at gmail.com>:

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.

----------
assignee: benjamin.peterson
messages: 95602
nosy: benjamin.peterson, orsenthil
priority: normal
severity: normal
status: open
title: 2to3 - does not translate urllib2 to urllib.request correctly for function/method argument
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7375>
_______________________________________


More information about the New-bugs-announce mailing list