<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 9, 2014, at 1:41 PM, Paul Moore <<a href="mailto:p.f.moore@gmail.com" class="">p.f.moore@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">On 9 August 2014 17:02, Donald Stufft <<a href="mailto:donald@stufft.io" class="">donald@stufft.io</a>> wrote:<br class=""><blockquote type="cite" class="">To be clear, the direct reference is mostly for use in the install_requires.<br class="">On the CLI pip can still just take a path to a file or whatever. This feature<br class="">is intended to replace dependency_links in a way that people can use<br class="">them for private packages but that they won't be allowed on PyPI or the<br class="">like.<br class=""></blockquote><br class="">Understood. I'd still like an explicit pointer to the canonical URL<br class="">details tools should (or must?) use. See<br class=""><a href="http://en.wikipedia.org/wiki/File_URI_scheme" class="">http://en.wikipedia.org/wiki/File_URI_scheme</a> (specifically the<br class="">"Windows" sections) for why I'm bothered - specifically the quote<br class="">"Here are *some* examples which *may* be accepted by some<br class="">applications" (emphasis mine).<br class=""><br class="">I'd be more than happy if the spec was just "tools will use XXX from<br class="">the Python standard library. But note (the first 4 are the supposedly<br class="">acceptable URLs from that Wikipedia article):<br class=""><br class=""><blockquote type="cite" class="">py<br class=""></blockquote>Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600<br class="">64 bit (AMD64)] on win32<br class="">Type "help", "copyright", "credits" or "license" for more information.<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">from urllib.request import url2pathname<br class="">url2pathname("<a href="file://localhost/c|/WINDOWS/clock.avi" class="">file://localhost/c|/WINDOWS/clock.avi</a>")<br class=""></blockquote></blockquote></blockquote>Traceback (most recent call last):<br class="">  File "<stdin>", line 1, in <module><br class="">  File "C:\Apps\Python34\lib\nturl2path.py", line 26, in url2pathname<br class="">    raise OSError(error)<br class="">OSError: Bad URL: file|//localhost/c|/WINDOWS/clock.avi<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">url2pathname("<a href="file:///c|/WINDOWS/clock.avi" class="">file:///c|/WINDOWS/clock.avi</a>")<br class=""></blockquote></blockquote></blockquote>Traceback (most recent call last):<br class="">  File "<stdin>", line 1, in <module><br class="">  File "C:\Apps\Python34\lib\nturl2path.py", line 26, in url2pathname<br class="">    raise OSError(error)<br class="">OSError: Bad URL: file|///c|/WINDOWS/clock.avi<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">url2pathname("<a href="file://localhost/c:/WINDOWS/clock.avi" class="">file://localhost/c:/WINDOWS/clock.avi</a>")<br class=""></blockquote></blockquote></blockquote>Traceback (most recent call last):<br class="">  File "<stdin>", line 1, in <module><br class="">  File "C:\Apps\Python34\lib\nturl2path.py", line 26, in url2pathname<br class="">    raise OSError(error)<br class="">OSError: Bad URL: file|//localhost/c|/WINDOWS/clock.avi<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">url2pathname("<a href="file:///c:/WINDOWS/clock.avi" class="">file:///c:/WINDOWS/clock.avi</a>")<br class=""></blockquote></blockquote></blockquote>Traceback (most recent call last):<br class="">  File "<stdin>", line 1, in <module><br class="">  File "C:\Apps\Python34\lib\nturl2path.py", line 26, in url2pathname<br class="">    raise OSError(error)<br class="">OSError: Bad URL: file|///c|/WINDOWS/clock.avi<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">url2pathname("<a href="file:////WINDOWS/clock.avi" class="">file:////WINDOWS/clock.avi</a>")<br class=""></blockquote></blockquote></blockquote>'E:<a href="smb://WINDOWS//clock.avi'" class="">\\WINDOWS\\clock.avi'</a><br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">url2pathname("<a href="file:///WINDOWS/clock.avi" class="">file:///WINDOWS/clock.avi</a>")<br class=""></blockquote></blockquote></blockquote>'E:<a href="smb://WINDOWS//clock.avi'" class="">\\WINDOWS\\clock.avi'</a><br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">url2pathname("<a href="file://WINDOWS/clock.avi" class="">file://WINDOWS/clock.avi</a>")<br class=""></blockquote></blockquote></blockquote>'E:<a href="smb://WINDOWS//clock.avi'" class="">\\WINDOWS\\clock.avi'</a><br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">url2pathname("file:/WINDOWS/clock.avi")<br class=""></blockquote></blockquote></blockquote>'E:<a href="smb://WINDOWS//clock.avi'" class="">\\WINDOWS\\clock.avi'</a><br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><br class=""></blockquote></blockquote></blockquote><br class="">I have no idea where Python got that E drive from - my current drive is C:.<br class=""><br class="">At this point in time, I have no idea how to correctly write a file<br class="">URL for the file C:\Windows\clock.avi on my PC. While it's very<br class="">definitely a corner case in the PEP, and it's clearly not the PEP's<br class="">responsibility to explain the file URL spec, I do think it's relevant<br class="">to the usability of the PEP.<br class=""><br class="">Paul<br class=""></div></blockquote><br class=""></div><div><div>Does: <a href="file:///c:/WINDOWS/clock.avi" class="">file:///c:/WINDOWS/clock.avi</a> work? That’s pointed out in the wikipage you</div><div>linked as to what IE has done since IE4 and seems to be the most reasonable</div><div>candidate. It also uses <a href="file://remotehost/sharename/dir/file.txt" class="">file://remotehost/sharename/dir/file.txt</a> for UNC paths</div><div>apparently.</div><div><br class=""></div><div>I misunderstood the problem though, I thought you were worried about needing to</div><div>type out the file:// and the slash order on the CLI, not referencing files at</div><div>all. We can absolutely add more details to the PEP.</div></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">---</div><div class="">Donald Stufft</div><div class="">PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA</div></div></div>
</div>
<br class=""></body></html>