-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
[WIP] GH-89727: Fix shutil.rmtree()
recursion error on deep trees.
#103164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
17f02bb
GH-89727: Fix `shutil.rmtree()` recursion error on deep trees.
barneygale 48dc5db
Delay urllib import
barneygale 6e92b27
Fix up filenames in exceptions
barneygale c042220
Restore `shutil._rmtree_islink()`
barneygale e268e89
Tidy up exception handling
barneygale 3f40cb0
Better compatibility with shutil tests.
barneygale b59bda8
Move main implementation into pathlib
barneygale c174376
Make `_fwalk()` private, tidy up naming.
barneygale 0e8d8e6
Fix tests
barneygale fea58ab
Fix missing filename in exception, tidy up more naming.
barneygale bff0f5e
More cleanup
barneygale 3b21684
Even more tidy-up
barneygale 5abee55
Reduce diff a bit
barneygale 57173d9
Performance improvements
barneygale 58070d9
Simplify rmtree (h/t eryksun)
barneygale d61baa1
More performance tweaks
barneygale e983dd7
Make `error._func` private, as it's only intended for `shutil.rmtree()`
barneygale 5387d32
Improve tests
barneygale 75541fb
Improve performance
barneygale 698db60
Merge branch 'main' into pathlib-fwalk
barneygale 74cdd6c
Supply relative paths to `rmdir()` in fd-based walk.
barneygale c17d07c
Handle rmdir() and unlink() not accepting dir_fd
barneygale b4f120c
Move rmtree() implementation back into shutil.
barneygale e856ccb
Restore missing dir_fd check
barneygale d1e349c
Remove unnecessary change to test
barneygale 63e55e1
Reduce memory usage a bit.
barneygale f7c5352
Reduce diff
barneygale File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.