From df2971fb2682faf4a4cef382733e6a074b8accac Mon Sep 17 00:00:00 2001 From: Alexey Semenyuk Date: Sun, 15 Jun 2025 18:04:12 +0500 Subject: [PATCH 1/2] gh-134538: link to example for windows readonly file handling in function docs --- Doc/library/shutil.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index c78dfe1aafa0ed..abe40abf34f7fe 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -327,6 +327,10 @@ Directory and files operations The deprecated *onerror* is similar to *onexc*, except that the third parameter it receives is the tuple returned from :func:`sys.exc_info`. + .. seealso:: + :ref:`shutil-rmtree-example` for an example of handling read-only files + on Windows. + .. audit-event:: shutil.rmtree path,dir_fd shutil.rmtree .. versionchanged:: 3.3 From 1bd0a482d74cc7ec8936a10e170a53226a2e99fb Mon Sep 17 00:00:00 2001 From: alexey semenyuk Date: Thu, 19 Jun 2025 01:24:09 +0500 Subject: [PATCH 2/2] Remove mention Windows --- Doc/library/shutil.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index abe40abf34f7fe..e7c4c4f46bd011 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -328,8 +328,8 @@ Directory and files operations parameter it receives is the tuple returned from :func:`sys.exc_info`. .. seealso:: - :ref:`shutil-rmtree-example` for an example of handling read-only files - on Windows. + :ref:`shutil-rmtree-example` for an example of handling the removal + of a directory tree that contains read-only files. .. audit-event:: shutil.rmtree path,dir_fd shutil.rmtree