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.

Author orsenthil
Recipients martin.panter, orsenthil
Date 2014-07-15.08:43:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1405413826.73.0.140759117654.issue21970@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for the report. Point 2 is definitely a bug (and an overlook by me), I will fix it.

I think, the url[:2] == '//' check was present for ftp case which supported file:// protocol. I can't see a clear requirement to change here.

The scenarios you encounter when giving a two different paths are interesting because, in one the path stat('/invalid/path') and in the other it is the path '/' that is stat and only late is the hostname verified if it coming from localhost (http://hg.python.org/cpython/file/ddfcaeb1c56b/Lib/urllib/request.py#l1353). 
Since both presence of file locally and then ensuring the host is localhost needs to be done, the current order gives faster failures for most common use-cases.
History
Date User Action Args
2014-07-15 08:43:46orsenthilsetrecipients: + orsenthil, martin.panter
2014-07-15 08:43:46orsenthilsetmessageid: <1405413826.73.0.140759117654.issue21970@psf.upfronthosting.co.za>
2014-07-15 08:43:46orsenthillinkissue21970 messages
2014-07-15 08:43:46orsenthilcreate