{{ message }}
GH-73991: Rework pathlib.Path.copytree() into copy()#122369
Merged
barneygale merged 20 commits intoAug 11, 2024
Merged
Conversation
Rename `pathlib.Path.copy()` to `_copy_file()` (i.e. make it private.) Rename `pathlib.Path.copytree()` to `copy()`, and add support for copying non-directories. This simplifies the interface for users, and nicely complements the upcoming `move()` and `delete()` methods (which will also accept any type of file.)
Contributor
Author
|
Making the old |
Sorry, something went wrong.
Contributor
Author
|
Hey @nineteendo, could you review this please, if you're up for it? Thanks in advance! |
Sorry, something went wrong.
nineteendo
reviewed
Aug 4, 2024
nineteendo
reviewed
Aug 4, 2024
AA-Turner
reviewed
Aug 7, 2024
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
AA-Turner
approved these changes
Aug 11, 2024
AA-Turner
left a comment
Member
There was a problem hiding this comment.
Danke!
A
Sorry, something went wrong.
Contributor
Author
|
Thank you for the review, very helpful! |
Sorry, something went wrong.
blhsing
pushed a commit
to blhsing/cpython
that referenced
this pull request
Aug 22, 2024
…n#122369) Rename `pathlib.Path.copy()` to `_copy_file()` (i.e. make it private.) Rename `pathlib.Path.copytree()` to `copy()`, and add support for copying non-directories. This simplifies the interface for users, and nicely complements the upcoming `move()` and `delete()` methods (which will also accept any type of file.) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.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.
Rename
pathlib.Path.copy()to_copy_file()(i.e. make it private.)Rename
pathlib.Path.copytree()tocopy(), and add support for copying non-directories. This simplifies the interface for users, and nicely complements the upcomingmove()anddelete()methods (which will also accept any type of file.)📚 Documentation preview 📚: https://cpython-previews--122369.org.readthedocs.build/