[Python-Dev] urllib2/urllib incompatibility?
Vinay Sajip
vinay_sajip at yahoo.co.uk
Mon May 24 12:00:07 CEST 2010
Senthil Kumaran <orsenthil <at> gmail.com> writes:
>
> The actual (and Valid) file:// url in your case is 'file:///tmp/hello.txt'
> And this was fine and consistent.
>
> The extra '/' is making it in invalid url in urllib2, I think that be
> tracked as bug at least to show a consistent behaviour. The local
> file open methods of urllib2 and urllib are different.
>
Yes, it seems to be a bug in urllib which permits an invalid URL to pass. I came
across it by accident, I normally use urls like file://localhost/tmp/hello.txt
so I don't trip over the /// hurdles :-)
I'll raise an issue on the tracker.
Regards,
Vinay Sajip
More information about the Python-Dev
mailing list