[issue34276] urllib.parse doesn't round-trip file URI's with multiple leading slashes

Chris Jerdonek report at bugs.python.org
Mon Jul 30 23:38:53 EDT 2018


Chris Jerdonek <chris.jerdonek at gmail.com> added the comment:

Thanks for all the extra info. A couple more comments:

1. I came across this issue when diagnosing the following pip issue ("pip install git+file://" not working for Windows UNC paths):
https://github.com/pypa/pip/issues/3783

2. URLs of the form "file:////root" (with four or more leading slashes) are perhaps not valid URI's technically. See Section 3. "Syntax Components" of RFC 3986, where it says, "When authority [i.e. netloc] is not present, the path cannot begin with two slash characters ('//')":
https://tools.ietf.org/html/rfc3986#section-3

However, I don't think that means Python shouldn't try to roundtrip it successfully. Also, git-clone is apparently okay with URLs of this form, and does the right thing with them.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34276>
_______________________________________


More information about the Python-bugs-list mailing list