8000 gh-113188: Fix shutil.copymode() on Windows by serhiy-storchaka · Pull Request #113189 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-113188: Fix shutil.copymode() on Windows #113189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update docs.
  • Loading branch information
serhiy-storchaka committed Dec 23, 2023
commit 1ebc29ea94648d4bf6bd023dc96190aeaebb53fb
14 changes: 0 additions & 14 deletions Doc/library/shutil.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,6 @@ Directory and files operations
.. versionchanged:: 3.3
Added *follow_symlinks* argument.

.. versionchanged:: 3.13
In older Python versions :func:`!copymode` worked differenly on Windows
if *dst* is a symbolic link: it modified the permission bits of *dst*
itself rather than the file it points to if *follow_symlinks* is true
or *src* is not a symbolic link, and did not modify the permission bits
if *follow_symlinks* is false and *src* is a symbolic link.

.. function:: copystat(src, dst, *, follow_symlinks=True)

Copy the permission bits, last access time, last modification time, and
Expand Down Expand Up @@ -162,13 +155,6 @@ Directory and files operations
.. versionchanged:: 3.3
Added *follow_symlinks* argument and support for Linux extended attributes.

.. versionchanged:: 3.13
In older Python versions :func:`!copymode` worked differenly on Windows
if *dst* is a symbolic link: it modified the permission bits of *dst*
itself rather than the file it points to if *follow_symlinks* is true
or *src* is not a symbolic link, and did not modify the permission bits
if *follow_symlinks* is false and *src* is a symbolic link.

.. function:: copy(src, dst, *, follow_symlinks=True)

Copies the file *src* to the file or directory *dst*. *src* and *dst*
Expand Down
7 changes: 0 additions & 7 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1159,13 +1159,6 @@ Changes in the Python API
other "private" attributes.
(See :gh:`112826`.)

* In older Python versions :mod:`shutil` functions :func:`~shutil.copymode`,
:func:`~shutil.copystat`, :func:`~shutil.copy` and :func:`~shutil.copy2`
worked differenly on Windows if *dst* is a symbolic link:
they modified the permission bits of *dst*
itself rather than the file it points to if *follow_symlinks* is true
or *src* is not a symbolic link, and did not modify the permission bits
if *follow_symlinks* is false and *src* is a symbolic link.

Build Changes
=============
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Fix :func:`shutil.copymode` on Windows. Previously it worked differenly if
*dst* is a symbolic link: it modified the permission bits of *dst* itself
Fix :func:`shutil.copymode` and :func:`shutil.copystat` on Windows.
Previously they worked differenly if *dst* is a symbolic link:
they modified the permission bits of *dst* itself
rather than the file it points to if *follow_symlinks* is true or *src* is
not a symbolic link, and did not modify the permission bits if
*follow_symlinks* is false and *src* is a symbolic link.
0