SIGN IN SIGN UP

[3.12] GH-89727: Partially fix `shutil.rmtree()` recursion error on deep trees (GH-119634) (#119749)

* GH-89727: Partially fix `shutil.rmtree()` recursion error on deep trees (#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.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit a150679f90c6e3f017bd75cac3b8f727063cc4aa)
B
Barney Gale committed
45587df8d0a129fb580cdd591f514efb09f49305
Parent: e902503
Committed by GitHub <noreply@github.com> on 5/29/2024, 8:53:08 PM