]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.6] bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) (GH-10068)
authorZsolt Cserna <cserna.zsolt@gmail.com>
Tue, 23 Oct 2018 21:58:11 +0000 (23:58 +0200)
committerVictor Stinner <vstinner@redhat.com>
Tue, 23 Oct 2018 21:58:11 +0000 (23:58 +0200)
commit797cfbd69e3484ecf25f5acf75b06691e3fc97fa
treeadd77cc0b7a3f4b641ab82f25642219e9cdd6c07
parent2c549250d8fd6755e3338a771d250e34c78bdb50
[3.6] bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) (GH-10068)

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