Author Anthony Sottile
Recipients Anthony Sottile
Date 2017-11-04.00:14:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Here's one idea for a patch (inspired by the rest of the function):

diff --git a/Lib/ b/Lib/
index 464ee91..2099289 100644
--- a/Lib/
+++ b/Lib/
@@ -213,6 +213,13 @@ def copystat(src, dst, *, follow_symlinks=True):
         # symlink.  give up, suppress the error.
         # (which is what shutil always did in this circumstance.)
+    except OSError as why:
+        # lchmod on alpine will raise this with symlinks: #31940
+        for err in 'EOPNOTSUPP', 'ENOTSUP':
+            if hasattr(errno, err) and why.errno == getattr(errno, err):
+                break
+        else:
+            raise
     if hasattr(st, 'st_flags'):
             lookup("chflags")(dst, st.st_flags, follow_symlinks=follow)

However lchmod seems to be just broken on alpine so the tests continue to fail (however my usecase is fixed)
Date User Action Args
2017-11-04 00:14:49Anthony Sottilesetrecipients: + Anthony Sottile
2017-11-04 00:14:49Anthony Sottilesetmessageid: <>
2017-11-04 00:14:49Anthony Sottilelinkissue31940 messages
2017-11-04 00:14:49Anthony Sottilecreate