Steve Dower <steve.do...@python.org> added the comment:

Is this an issue or a mismatched expectation?

Tests that assume realpath() on Windows is the equivalent of abspath() are of 
course going to fail when we fix realpath(), and that's kind of what this one 
looks like. Just because it doesn't have a direct Unix equivalent doesn't mean 
that any particular behavior is any better.

> Unix Python resolves the executable path with repeated _Py_wreadlink calls. 
> Windows Python should do something similar to ensure the consistency of 
> sys.executable with realpath(sys.executable).

I don't think this necessarily follows. There's nowhere in the documentation 
that says that sys.executable is even a valid path, let alone the final path.

> I think we want relpath(realpath('C:/Temp/foo'), realpath('S:/')) to succeed 
> as r"..\foo". I don't think we want it to fail as a cross-drive relative path.

Cross-drive relative paths are fine though - they are just absolute paths :)

>  The documentation refers to symbolic links and junctions, which are 
> different from mapped network and subst drives (AFAIU).

If we can easily tell the difference between directory junctions and mapped 
drives, given that they are both identical types of reparse points, then we can 
make readlink() only read directory junctions. I need a specific algorithm for 
telling the difference though, not just lists of examples of things that 
"should" work (without any rationale for why they ought to work).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37993>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to