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 steve.dower
Recipients eryksun, jaraco, paul.moore, steve.dower, tim.golden, zach.ware
Date 2020-05-25.19:49:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590436169.84.0.617479316914.issue40654@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-05-25 19:49:29steve.dowersetrecipients: + steve.dower, paul.moore, jaraco, tim.golden, zach.ware, eryksun
2020-05-25 19:49:29steve.dowersetmessageid: <1590436169.84.0.617479316914.issue40654@roundup.psfhosted.org>
2020-05-25 19:49:29steve.dowerlinkissue40654 messages
2020-05-25 19:49:28steve.dowercreate