-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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-73991: Rework pathlib.Path.rmtree()
into delete()
#122368
Conversation
Rename `pathlib.Path.rmtree()` to `delete()`, and add support for deleting non-directories. This simplifies the interface for users, and nicely complements the upcoming `move()` and `copy()` methods (which will also accept any type of file.)
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.
Implementation looks fine, only one question
A
@nineteendo I'd welcome your review on this, if you have the time and inclination. No worries if not! Thanks in advance :) |
We generally put the more primitive functions first.
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.
Merci beaucoup!
A
Thank you very much for the reviews :) |
Sorry for my tardiness! Do let me know if there's anything else I can usefully review A |
Not tardy at all I don't think! :]
Since you're offering, the next PR on the critical path here is #122369. But there's a lot going on there, so feel free to give it a miss or ask me to explain it further / break it up / whatever. Thanks again! And feel free to assign me when you next need a review of something. |
…n#122368) Rename `pathlib.Path.rmtree()` to `delete()`, and add support for deleting non-directories. This simplifies the interface for users, and nicely complements the upcoming `move()` and `copy()` methods (which will also accept any type of file.)
Rename
pathlib.Path.rmtree()
todelete()
, and add support for deleting non-directories. This simplifies the interface for users, and nicely complements the upcomingmove()
andcopy()
methods (which will also accept any type of file.)📚 Documentation preview 📚: https://cpython-previews--122368.org.readthedocs.build/