mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
GH-89727: Fix shutil.rmtree()
recursion error on deep trees (#119808)
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
.
This commit is contained in:
parent
63111bfcf0
commit
53b1981fb0
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