[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2019-02-10 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> never enable lchmod on Linux ___ Python tracker

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2018-08-07 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: > if I'm reading the manpage correctly: `readlink` tells the filename that the > symlink points to. lchmod is concerned with setting the `stat` on the link > itself (which only some platforms actually support) Oops, my bad. Ignore

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-12-15 Thread Anthony Sottile
Anthony Sottile added the comment: if I'm reading the manpage correctly: `readlink` tells the filename that the symlink points to. lchmod is concerned with setting the `stat` on the link itself (which only some platforms actually support) --

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-12-15 Thread STINNER Victor
STINNER Victor added the comment: Dummy question. If lchmod() is not supported by the libc, would it be possible to reimplement it using readlink()? -- ___ Python tracker

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-12-10 Thread Anthony Sottile
Change by Anthony Sottile : -- pull_requests: +4684 ___ Python tracker ___ ___

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't have any strong opinion, but I think doing the check at runtime is better. -- ___ Python tracker

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-06 Thread STINNER Victor
STINNER Victor added the comment: If lchmod() fails with [Errno 95] Not supported, IMHO chmod(path, mode, follow_symlinks=False) should behaves as lchmod() doesn't exist and falls back to the next case, as if HAVE_LCHMOD wasn't defined, but implement such falls back

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-06 Thread STINNER Victor
STINNER Victor added the comment: I would prefer to catch os.lchmod() exception and reminds that lchmod() doesn't work. Search for _O_TMPFILE_WORKS in Lib/tempfile.py for a Python example of code trying to use a function, or falls back on something else. (I gave

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-03 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +4230 stage: -> patch review ___ Python tracker ___

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-03 Thread Anthony Sottile
Anthony Sottile added the comment: Here's one idea for a patch (inspired by the rest of the function): ``` diff --git a/Lib/shutil.py b/Lib/shutil.py index 464ee91..2099289 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -213,6 +213,13 @@ def copystat(src, dst, *,

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-03 Thread Anthony Sottile
New submission from Anthony Sottile : Fortunately, this can be reproduced with the testsuite: ``` == ERROR: test_copystat_symlinks (__main__.TestShutil)