[issue37612] os.link(..., follow_symlinks=True) broken on Linux

2021-03-23 Thread Thomas Kluyver
Change by Thomas Kluyver : -- nosy: +takluyver nosy_count: 4.0 -> 5.0 pull_requests: +23755 pull_request: https://github.com/python/cpython/pull/24997 ___ Python tracker ___ __

[issue37612] os.link(..., follow_symlinks=True) broken on Linux

2021-03-12 Thread Eryk Sun
Change by Eryk Sun : -- components: +Extension Modules -Library (Lib) versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue37612] os.link(..., follow_symlinks=True) broken on Linux

2019-07-18 Thread Jo Henke
Change by Jo Henke : -- keywords: +patch pull_requests: +14634 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14843 ___ Python tracker ___ ___

[issue37612] os.link(..., follow_symlinks=True) broken on Linux

2019-07-18 Thread Jo Henke
Jo Henke added the comment: The problem that POSIX does not define the behavior of link() regarding symlinks (and that Unix implementations differ indeed), is independent from Python's os.link() defaults. Since it makes no sense to call link(), when linkat() is available, I propose this cha

[issue37612] os.link(..., follow_symlinks=True) broken on Linux

2019-07-18 Thread Eryk Sun
Eryk Sun added the comment: > on Windows (where there is no linkat()) os.link() creates a new link > to the symbolic link itself. Yes, CreateHardLinkW opens the source file by calling NtOpenFile with the option FILE_OPEN_REPARSE_POINT. So the behavior is follow_symlinks=False. Note, howeve

[issue37612] os.link(..., follow_symlinks=True) broken on Linux

2019-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not always linkat() can be used instead of link(). But on Windows (where there is no linkat()) os.link() creates a new link to the symbolic link itself. This is yet one argument for making follow_symlinks=False by default and changing the default behavior

[issue37612] os.link(..., follow_symlinks=True) broken on Linux

2019-07-17 Thread Jo Henke
New submission from Jo Henke : Regarding link() POSIX states (https://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html): "If path1 names a symbolic link, it is implementation-defined whether link() follows the symbolic link, or creates a new link to the symbolic link itself." I