-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
GH-89727: Partially fix shutil.rmtree()
recursion error on deep trees
#119634
Conversation
…ep trees 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.
I've added the 'skip news' label because this is only a partial fix. Hopefully that's right! |
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.
Thanks. I think this should have a NEWS entry since it does change a user-visible behavior.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Misc/NEWS.d/next/Library/2024-05-29-20-42-17.gh-issue-89727.5lPTTW.rst
Outdated
Show resolved
Hide resolved
…PTTW.rst Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Thank you Jelle! |
Thanks @barneygale for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…ep trees (pythonGH-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. (cherry picked from commit a150679) Co-authored-by: Barney Gale <barney.gale@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Sorry, @barneygale, I could not cleanly backport this to
|
GH-119748 is a backport of this pull request to the 3.13 branch. |
…ep trees (python#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 a150679)
…r on deep trees (pythonGH-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 a150679) Co-authored-by: Barney Gale <barney.gale@gmail.com>
GH-119749 is a backport of this pull request to the 3.12 branch. |
…eep trees (GH-119634) (#119748) GH-89727: Partially fix `shutil.rmtree()` recursion error on deep trees (GH-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. (cherry picked from commit a150679) Co-authored-by: Barney Gale <barney.gale@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
…eep 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 a150679)
…ep trees (python#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>
…ep trees (python#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>
Make
shutil._rmtree_unsafe()
callos.walk()
, which is implemented without recursion.shutil._rmtree_safe_fd()
is not affected and can still raise a recursion error.