SIGN IN SIGN UP

[3.13] GH-89727: Fix `shutil.rmtree()` recursion error on deep trees (GH-119808) (#119918)

Implement `shutil._rmtree_safe_fd()` using a list as a stack to avoid emitting recursion errors on deeply nested trees.

`shutil._rmtree_unsafe()` was fixed in a150679f90.

(cherry picked from commit 53b1981fb0cda6c656069e992f172fc6aad7c99c)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
M
Miss Islington (bot) committed
225c3cd6c1b2e768f1c879c271b48ec27a99cb5b
Parent: 99d0f51
Committed by GitHub <noreply@github.com> on 6/1/2024, 7:38:55 PM