Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee=Noneclosed_at=<Date2014-06-11.18:41:21.738>created_at=<Date2013-11-30.13:05:40.134>labels= ['type-feature', 'library']
title='shutil.move(): Add ability to use custom copy function to allow to ignore metadata'updated_at=<Date2014-06-11.18:41:21.736>user='https://github.com/desbma'
shutil.move sometimes fail when the underlining filesystem has limitations.
Here is a part of a stacktrace I'm getting :
File "/usr/local/lib/python3.3/shutil.py", line 534, in move
File "/usr/local/lib/python3.3/shutil.py", line 244, in copy2
copystat(src, dst, follow_symlinks=follow_symlinks)
File "/usr/local/lib/python3.3/shutil.py", line 192, in copystat
lookup("chmod")(dst, mode, follow_symlinks=follow)
OSError: [Errno 38]
This behaviour is expected because shutil.move uses shutil.copy2 under the hood to copy file data and metadata.
However there is no way to tell shutil.move to use shutil.copy and to ignore metadata.
Maybe a new copy_metadata parameter (defaulting to True) or copy_function (like in shutil.copytree) would be an elegant solution?