Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 33.9k
GH-89727: Fix shutil.rmtree() recursion error on deep trees#119808
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
barneygale commented May 30, 2024 • edited by bedevere-app bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-app bot
Uh oh!
There was an error while loading. Please reload this page.
barneygale commented May 30, 2024
I tried to implement this atop |
ambv left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how this is more concise and protects against recursion errors. It's somewhat less obvious what's going on here now, I left some comments.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ambv left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'll let Jelle comment and merge.
Uh oh!
There was an error while loading. Please reload this page.
barneygale commented Jun 1, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Thanks very much for the reviews, both! @JelleZijlstra can I merge, or would you like to do the honours as Łukasz suggested? This will hit a conflict when backported to 3.12 due to a difference in |
JelleZijlstra commented Jun 1, 2024
Feel free to merge yourself! |
barneygale commented Jun 1, 2024
Super. Thanks again! |
Thanks @barneygale for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…ythonGH-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 a150679. (cherry picked from commit 53b1981) Co-authored-by: Barney Gale <barney.gale@gmail.com>
GH-119918 is a backport of this pull request to the 3.13 branch. |
Sorry, @barneygale, I could not cleanly backport this to |
…ython#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 a150679. (cherry picked from commit 53b1981)
…trees (pythonGH-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 a150679.. (cherry picked from commit 53b1981) Co-authored-by: Barney Gale <barney.gale@gmail.com>
GH-119919 is a backport of this pull request to the 3.12 branch. |
…ython#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 a150679.
…ython#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 a150679.
…ython#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 a150679.
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 #119634.