➜

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, paul.moore, simon mackenzie, steve.dower, tim.golden, zach.ware
Date 2021-01-22.19:44:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1611344683.55.0.427644975277.issue42957@roundup.psfhosted.org>
In-reply-to
Content
I agree with Eryk (unsurprisingly, we discussed this change *a lot* back when it was made ~3 years ago).

os.readlink is the lowest-level API that gives a reliable result.

os.path.realpath is the high-level API that probably does what most users want most of the time (and relies on os.readlink being reliable).

We can't change either of these to more of a middle-ground without taking away the ability for users to implement their own behaviour. So there's no behavioural issue here. (The behavioural issue we fixed in 3.8 was that realpath didn't resolve anything at all, so we're not reverting back to that.)

If you'd like a new API added to either retrieve the display path or to read a link and try to partially normalise the result without resolving any more links, please open an issue specifically for that (targeting Python 3.10). You probably also want to prototype a wrapper around readlink() to do it, and be prepared to have many potential edge cases thrown against it.
History
Date User Action Args
2021-01-22 19:44:43steve.dowersetrecipients: + steve.dower, paul.moore, tim.golden, zach.ware, eryksun, simon mackenzie
2021-01-22 19:44:43steve.dowersetmessageid: <1611344683.55.0.427644975277.issue42957@roundup.psfhosted.org>
2021-01-22 19:44:43steve.dowerlinkissue42957 messages
2021-01-22 19:44:43steve.dowercreate