[issue42957] os.readlink produces wrong result on windows

2021-04-27 Thread Steve Dower
Change by Steve Dower : -- pull_requests: -24360 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue42957] os.readlink produces wrong result on windows

2021-04-27 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +24360 pull_request: https://github.com/python/cpython/pull/25670 ___ Python tracker ___

[issue42957] os.readlink produces wrong result on windows

2021-04-27 Thread Steve Dower
Change by Steve Dower : -- pull_requests: -24359 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue42957] os.readlink produces wrong result on windows

2021-04-27 Thread Ethan Furman
Change by Ethan Furman : -- nosy: +ethan.furman nosy_count: 6.0 -> 7.0 pull_requests: +24359 pull_request: https://github.com/python/cpython/pull/25670 ___ Python tracker ___ _

[issue42957] os.readlink produces wrong result on windows

2021-01-22 Thread Steve Dower
Steve Dower added the comment: 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 th

[issue42957] os.readlink produces wrong result on windows

2021-01-19 Thread Eryk Sun
Eryk Sun added the comment: os.readlink() was generalized to support mountpoints (junctions) as well as symlinks, and it's more common for mountpoints to lack the print name field in the reparse data buffer [1]. For example, PowerShell's new-item creates junctions that only have a substitute

[issue42957] os.readlink produces wrong result on windows

2021-01-19 Thread simon mackenzie
simon mackenzie added the comment: I note os.path.realpath("v1") does produce the right path in windows. Maybe that is what you meant. Will that work cross-platform? On Tue, 19 Jan 2021 at 18:48, simon mackenzie wrote: > For most people the expectation would be that it returns a path in the

[issue42957] os.readlink produces wrong result on windows

2021-01-19 Thread simon mackenzie
simon mackenzie added the comment: For most people the expectation would be that it returns a path in the same format as any other path. Furthermore it seems odd to change the default behaviour after years when it worked as expected. I never heard of this substitute path before and it does not

[issue42957] os.readlink produces wrong result on windows

2021-01-18 Thread Eryk Sun
Eryk Sun added the comment: Symlinks and mountpoints (aka junctions) contain two forms of the target path. There's a path that's intended for display in the shell, and there's the actual substitute path to which the link resolves. os.readlink() was changed to return the substitute path becau

[issue42957] os.readlink produces wrong result on windows

2021-01-18 Thread simon mackenzie
New submission from simon mackenzie : os.readlink gives wrong result on python 3.8 onwards for windows os.readlink("c:/users/simon/v1") '?\\d:\\v1' Should read d:\\v1 -- components: Windows messages: 385218 nosy: paul.moore, simon mackenzie, steve.dower, tim.golden, zach.ware prio