Created on 2013-11-30 13:05 by desbma, last changed 2022-04-11 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| shutil.patch | Claudiu.Popa, 2013-12-01 08:48 | review | ||
| issue19840.patch | Claudiu.Popa, 2014-03-16 20:19 | Fix trailing whitespaces. | review | |
| issue19840_1.patch | Claudiu.Popa, 2014-06-10 15:21 | review | ||
| Messages (8) | |||
|---|---|---|---|
| msg204807 - (view) | Author: desbma (desbma) * | Date: 2013-11-30 13:05 | |
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 copy2(src, real_dst) 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? |
|||
| msg204835 - (view) | Author: R. David Murray (r.david.murray) * | Date: 2013-11-30 18:52 | |
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 ;) |
|||
| msg204891 - (view) | Author: PCManticore (Claudiu.Popa) * | Date: 2013-12-01 08:48 | |
Hi. Here's a patch which adds `copy_function` parameter to `shutil.move`. |
|||
| msg220142 - (view) | Author: PCManticore (Claudiu.Popa) * | Date: 2014-06-10 06:56 | |
Any type of feedback will be appreciated. |
|||
| msg220166 - (view) | Author: R. David Murray (r.david.murray) * | Date: 2014-06-10 13:43 | |
Review comments added. Patch looks good after the doc fixes. We also need a whatsnew entry. |
|||
| msg220170 - (view) | Author: PCManticore (Claudiu.Popa) * | Date: 2014-06-10 15:21 | |
Thanks, David. The new version of the patch is attached. |
|||
| msg220296 - (view) | Author: Roundup Robot (python-dev) | Date: 2014-06-11 18:40 | |
New changeset 0d61a2a50f9f by R David Murray in branch 'default': #19840: Add copy_function to shutil.move. http://hg.python.org/cpython/rev/0d61a2a50f9f |
|||
| msg220297 - (view) | Author: R. David Murray (r.david.murray) * | Date: 2014-06-11 18:41 | |
Thanks, Claudiu. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:54 | admin | set | github: 64039 |
| 2014-06-11 18:41:21 | r.david.murray | set | status: open -> closed resolution: fixed messages: + msg220297 stage: resolved |
| 2014-06-11 18:40:27 | python-dev | set | nosy:
+ python-dev messages: + msg220296 |
| 2014-06-10 18:53:31 | Arfrever | set | title: The is no way to tell shutil.move to ignore metadata -> shutil.move(): Add ability to use custom copy function to allow to ignore metadata |
| 2014-06-10 15:21:25 | Claudiu.Popa | set | files:
+ issue19840_1.patch messages: + msg220170 |
| 2014-06-10 13:43:02 | r.david.murray | set | messages: + msg220166 |
| 2014-06-10 06:56:05 | Claudiu.Popa | set | messages: + msg220142 |
| 2014-03-16 20:19:30 | Claudiu.Popa | set | files: + issue19840.patch |
| 2013-12-01 08:48:10 | Claudiu.Popa | set | files:
+ shutil.patch keywords: + patch messages: + msg204891 |
| 2013-12-01 08:35:54 | Claudiu.Popa | set | nosy:
+ Claudiu.Popa |
| 2013-12-01 08:06:41 | Arfrever | set | nosy:
+ Arfrever |
| 2013-11-30 18:52:41 | r.david.murray | set | versions: + Python 3.5, - Python 3.3 |
| 2013-11-30 18:52:08 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg204835 |
| 2013-11-30 13:05:40 | desbma | create | |