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 gregcouch
Date 2005-12-06.20:21:06
SpamBayes Score
Marked as misclassified
Logged In: YES 

Oops, that was bug #1352621 for an analysis of why the
previous fix was bad.  I closed it as a duplicate because
this bug was reopened.

The short answer to your question about schemeless URLs, is
no, they aren't supposed to work because they are not URLs.
 Whether or not should support filesystem
paths in addition to URLs, is a different
bug/question/patch.  In my application, I encapsulate with code that supports it and it could be
added fairly easily.  Here's the information needed for
anyone to do so:


works or not is browser dependent (works with Netscape
4.76!).  In fact, even the other example:"file:///tmp/mmhelp.html")

will fail on some browsers (Safari, may be fixed by now),
and one needs to do:"file://localhost/tmp/mmhelp.html")

instead (so a bug, but one my application had to
workaround).  I recall there being cases of the reverse
being true, but I can't find those notes.

Constructing the file URL is a minor pain, but I'm not sure
what I'd change.  I use urllib.pathname2url(), but that
doesn't add the file scheme.  So I use urlparse.urlunparse
to build the actual URL -- that seems like overkill, but I
might have a fragment (some browsers support fragments with
the file scheme, some just ignore them).  The OS X bug is
easy fix in between the calls to pathname2url and urlunparse.
Date User Action Args
2007-08-23 14:35:48adminlinkissue1338995 messages
2007-08-23 14:35:48admincreate