]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[2.7] bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) (GH-10071)
authorZsolt Cserna <cserna.zsolt@gmail.com>
Wed, 24 Oct 2018 21:22:27 +0000 (23:22 +0200)
committerVictor Stinner <vstinner@redhat.com>
Wed, 24 Oct 2018 21:22:27 +0000 (23:22 +0200)
commit4a59c9699ca8688359c460f98127a12e2db6e63b
tree43e7a10b039eb555917e870a0d55ce5d6e0fce2f
parenta1f45ec73f0486b187633e7ebc0a4f559d29d7d9
[2.7] bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) (GH-10071)

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