-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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 <[email protected]>
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 <[email protected]>
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 <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
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 <[email protected]> (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 <[email protected]>. (cherry picked from commit a150679) Co-authored-by: Barney Gale <[email protected]>
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 <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
…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 <[email protected]> (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 <[email protected]>
…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 <[email protected]>
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.