mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
bpo-18108: Adding dir_fd and follow_symlinks keyword args to shutil.chown (GH-15811)
* Adding dir_fd and follow_symlinks keyword args to shutil.chown * Extending test_shutil.TestShutil.test_chown to include new kwargs * Updating shutil.chown documentation Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Berker Peksag <berker.peksag@gmail.com> Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
This commit is contained in:
parent
78ba4cb758
commit
8974a63f5e
5 changed files with 53 additions and 4 deletions
|
|
@ -421,7 +421,8 @@ Directory and files operations
|
|||
|
||||
.. availability:: Unix, Windows.
|
||||
|
||||
.. function:: chown(path, user=None, group=None)
|
||||
.. function:: chown(path, user=None, group=None, *, dir_fd=None, \
|
||||
follow_symlinks=True)
|
||||
|
||||
Change owner *user* and/or *group* of the given *path*.
|
||||
|
||||
|
|
@ -436,6 +437,9 @@ Directory and files operations
|
|||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
.. versionchanged:: 3.13
|
||||
Added *dir_fd* and *follow_symlinks* parameters.
|
||||
|
||||
|
||||
.. function:: which(cmd, mode=os.F_OK | os.X_OK, path=None)
|
||||
|
||||
|
|
|
|||
|
|
@ -594,6 +594,10 @@ os.path
|
|||
exactly one (back)slash to be absolute.
|
||||
(Contributed by Barney Gale and Jon Foster in :gh:`44626`.)
|
||||
|
||||
* Add support of *dir_fd* and *follow_symlinks* keyword arguments in
|
||||
:func:`shutil.chown`.
|
||||
(Contributed by Berker Peksag and Tahia K in :gh:`62308`)
|
||||
|
||||
pathlib
|
||||
-------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue