diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-05-29 20:41:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-29 20:41:03 (GMT) |
commit | 061abf8e4c1a0a920067aa73b0e41f40c89e340b (patch) | |
tree | 9a96ab7b452d756255902c34e235ff2bc61ff579 /Misc | |
parent | c3cfc04a736111cb61883cef08469ea46f86d9ce (diff) | |
download | cpython-061abf8e4c1a0a920067aa73b0e41f40c89e340b.zip cpython-061abf8e4c1a0a920067aa73b0e41f40c89e340b.tar.gz cpython-061abf8e4c1a0a920067aa73b0e41f40c89e340b.tar.bz2 |
[3.13] GH-89727: Partially fix `shutil.rmtree()` recursion error on deep trees (GH-119634) (#119748)
GH-89727: Partially fix `shutil.rmtree()` recursion error on deep trees (GH-119634)
Make `shutil._rmtree_unsafe()` call `os.walk()`, which is implemented
without recursion.
`shutil._rmtree_safe_fd()` is not affected and can still raise a recursion
error.
(cherry picked from commit a150679f90c6e3f017bd75cac3b8f727063cc4aa)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2024-05-29-20-42-17.gh-issue-89727.5lPTTW.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2024-05-29-20-42-17.gh-issue-89727.5lPTTW.rst b/Misc/NEWS.d/next/Library/2024-05-29-20-42-17.gh-issue-89727.5lPTTW.rst new file mode 100644 index 0000000..3b73d27 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-05-29-20-42-17.gh-issue-89727.5lPTTW.rst @@ -0,0 +1,3 @@ +Partially fix issue with :func:`shutil.rmtree` where a :exc:`RecursionError` +is raised on deep directory trees. A recursion error is no longer raised +when :data:`!rmtree.avoids_symlink_attacks` is false. |