mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
[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 ina150679f90
. (cherry picked from commit53b1981fb0
) Co-authored-by: Barney Gale <barney.gale@gmail.com>
This commit is contained in:
parent
99d0f51e61
commit
225c3cd6c1
3 changed files with 68 additions and 97 deletions
|
@ -741,7 +741,6 @@ class TestRmTree(BaseTest, unittest.TestCase):
|
|||
shutil.rmtree(TESTFN)
|
||||
raise
|
||||
|
||||
@unittest.skipIf(shutil._use_fd_functions, "fd-based functions remain unfixed (GH-89727)")
|
||||
def test_rmtree_above_recursion_limit(self):
|
||||
recursion_limit = 40
|
||||
# directory_depth > recursion_limit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue