bpo-31163: Added return values to pathlib.Path instance's rename and replace methods.#13582
Merged
Conversation
tirkarthi
reviewed
May 27, 2019
Contributor
|
I'd like to get @pitrou review for |
jaraco
approved these changes
Sep 11, 2019
Member
There was a problem hiding this comment.
Antoine is no longer reviewing pathlib, but I agree the approach here seems reasonable as does @brettcannon.
jaraco
reviewed
Sep 11, 2019
Member
Not entirely true, but I don't mind other people reviewing anyway :-) |
Member
|
Sounds fine on the principle, in any case. |
Contributor
|
Thanks @shangdahao for the PR, and @jaraco for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Sep 11, 2019
…replace methods. (pythonGH-13582) * bpo-31163: Added return values to pathlib.Path instance's rename and replace methods. (cherry picked from commit 088a09a) Co-authored-by: hui shang <shangdahao@gmail.com>
|
GH-15944 is a backport of this pull request to the 3.8 branch. |
jaraco
pushed a commit
that referenced
this pull request
Sep 11, 2019
DinoV
pushed a commit
to DinoV/cpython
that referenced
this pull request
Sep 12, 2019
…replace methods. (pythonGH-13582) * bpo-31163: Added return values to pathlib.Path instance's rename and replace methods.
websurfer5
pushed a commit
to websurfer5/cpython
that referenced
this pull request
Jul 20, 2020
…replace methods. (pythonGH-13582) * bpo-31163: Added return values to pathlib.Path instance's rename and replace methods.
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
Add this suggestion to a batch that can be applied as a single commit.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.Add this suggestion to a batch that can be applied as a single commit.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.Suggestion cannot be applied right now. Please check back later.
After a rename/replace the Path instance keeps "pointing" to the previous path, and does not return the new path, which is a little misunderstand. This patch make Path instance's rename and replace methods return the new Path instance.
https://bugs.python.org/issue31163