]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.7] bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) (GH-10065)
authorZsolt Cserna <cserna.zsolt@gmail.com>
Tue, 23 Oct 2018 21:57:55 +0000 (23:57 +0200)
committerVictor Stinner <vstinner@redhat.com>
Tue, 23 Oct 2018 21:57:55 +0000 (23:57 +0200)
commit861f61b5a93d178e913ad3c760d529ee3155e66d
tree13756b649a549025cf20cadcf3fb050a25b46930
parentf7cefb427cbc50d89a4f19f7f334a4f5421cefd3
[3.7] bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) (GH-10065)

Fix the documentation of copy2, as it does not copy file ownership (user and
group), only mode, mtime, atime and flags.

The original text was confusing to developers as it suggested that this
command is the same as 'cp -p', but according to cp(1), '-p' copies file
ownership as well.

Clarify which metadata is copied by shutil.copystat in its docstring.

(cherry picked from commit 4f399be0e70d8b5516b6213568b7665765bb3114)
Doc/library/shutil.rst
Lib/shutil.py