Author jaraco
Recipients eryksun, jaraco, paul.moore, steve.dower, tim.golden, zach.ware
Date 2020-05-22.16:51:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590166264.94.0.986366099781.issue40654@roundup.psfhosted.org>
In-reply-to
Content
> Changing readlink to always return the correct path was deliberate.

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. With this change, the following invariant holds on every platform except Python 3.8 on Windows (at least in the general case):

>>> os.symlink(x, y)
>>> assert os.readlink(y) == x

More importantly, AFAIK, Python provides no function to transform `x` into what one can expect as the result of `os.readlink(y)`. In other words, what value of `f` would make this invariant pass?

>>> os.symlink(x, y)
>>> assert os.readlink(y) == f(x)

Or put another way, is "C:\Users\jaraco\temp" an "incorrect path"?
History
Date User Action Args
2020-05-22 16:51:05jaracosetrecipients: + jaraco, paul.moore, tim.golden, zach.ware, eryksun, steve.dower
2020-05-22 16:51:04jaracosetmessageid: <1590166264.94.0.986366099781.issue40654@roundup.psfhosted.org>
2020-05-22 16:51:04jaracolinkissue40654 messages
2020-05-22 16:51:04jaracocreate