Steve Dower <steve.do...@python.org> added the comment:
I think we can safely say this is by design (I know Jason got his backport working). > Understood. However, this statement assumes the "correct path" is the most > precise path to resolve the target. If you instead define "correct path" as > the one that would be most friendly to the user who created the path, > readlink no longer honors that expectation. Nothing about the os module is meant to be user-friendly first - it's based on the POSIX spec ;) The most important thing is that operations that traverse symlinks should end up at the same file as a manual traversal using readlink. The easiest way to spoil this is to optimise for readability over correctness. As discussed, realpath does a little more work to ensure readability, and anything else that cares about UI can do similar work. But if the lowest-level function loses critical information, there's no way for the developer to get it back. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40654> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com