Issue 34260: shutil.copy2 is not the same as cp -p (original) (raw)
Created on 2018-07-28 12:43 by csernazs, last changed 2022-04-11 14:59 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 8523 | merged | python-dev,2018-07-28 12:56 | |
PR 10068 | merged | csernazs,2018-10-23 19:32 | |
PR 10071 | merged | csernazs,2018-10-23 19:46 | |
PR 10065 | merged | csernazs,2018-10-23 21:57 |
Messages (7) | ||
---|---|---|
msg322551 - (view) | Author: Zsolt Cserna (csernazs) * | Date: 2018-07-28 12:43 |
The docstring of shutil.copy2 says the following: Copy data and all stat info ("cp -p src dst"). This can be misleading as it is not the same as 'cp -p', as it does not copy the file owner (uid and gid). That would need to have a chown() call to be made, which is currently not called unavailable. I would like to have the documentation fixed by adding that it does not copies file owner and group. | ||
msg328297 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2018-10-23 10:09 |
New changeset 4f399be0e70d8b5516b6213568b7665765bb3114 by Victor Stinner (Zsolt Cserna) in branch 'master': bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) https://github.com/python/cpython/commit/4f399be0e70d8b5516b6213568b7665765bb3114 | ||
msg328348 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2018-10-23 21:58 |
New changeset 861f61b5a93d178e913ad3c760d529ee3155e66d by Victor Stinner (Zsolt Cserna) in branch '3.7': [3.7] bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) (GH-10065) https://github.com/python/cpython/commit/861f61b5a93d178e913ad3c760d529ee3155e66d | ||
msg328349 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2018-10-23 21:58 |
New changeset 797cfbd69e3484ecf25f5acf75b06691e3fc97fa by Victor Stinner (Zsolt Cserna) in branch '3.6': [3.6] bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) (GH-10068) https://github.com/python/cpython/commit/797cfbd69e3484ecf25f5acf75b06691e3fc97fa | ||
msg328394 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2018-10-24 21:22 |
New changeset 4a59c9699ca8688359c460f98127a12e2db6e63b by Victor Stinner (Zsolt Cserna) in branch '2.7': [2.7] bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) (GH-10071) https://github.com/python/cpython/commit/4a59c9699ca8688359c460f98127a12e2db6e63b | ||
msg328395 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2018-10-24 21:23 |
Thanks Zsolt Cserna for the report and for the documentation enhancements! The doc is now way better. | ||
msg328414 - (view) | Author: Zsolt Cserna (csernazs) * | Date: 2018-10-25 06:52 |
Thanks for your help! :) |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:59:04 | admin | set | github: 78441 |
2018-10-25 06:52:09 | csernazs | set | messages: + |
2018-10-24 21:23:19 | vstinner | set | status: open -> closedversions: + Python 2.7messages: + resolution: fixedstage: patch review -> resolved |
2018-10-24 21:22:35 | vstinner | set | messages: + |
2018-10-23 21:58:15 | vstinner | set | messages: + |
2018-10-23 21:58:00 | vstinner | set | messages: + |
2018-10-23 21:57:06 | csernazs | set | pull_requests: + <pull%5Frequest9405> |
2018-10-23 19:46:28 | csernazs | set | pull_requests: + <pull%5Frequest9404> |
2018-10-23 19:32:23 | csernazs | set | pull_requests: + <pull%5Frequest9401> |
2018-10-23 10:09:54 | vstinner | set | nosy: + vstinnermessages: + |
2018-07-28 12:56:05 | python-dev | set | keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest8041> |
2018-07-28 12:48:30 | giampaolo.rodola | set | nosy: + giampaolo.rodola |
2018-07-28 12:43:01 | csernazs | create |