-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shutil.move(): Add ability to use custom copy function to allow to ignore metadata #64039
Comments
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 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? |
Note that the equivalent linux command generates a warning message but does the move anyway. In other words, this seems like a very reasonable request ;) |
Hi. Here's a patch which adds |
Any type of feedback will be appreciated. |
Review comments added. Patch looks good after the doc fixes. We also need a whatsnew entry. |
Thanks, David. The new version of the patch is attached. |
New changeset 0d61a2a50f9f by R David Murray in branch 'default': |
Thanks, Claudiu. |
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
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: