Skip to content
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

bpo-31163: Added return values to pathlib.Path instance's rename and replace methods. #13582

Merged
merged 2 commits into from Sep 11, 2019

Conversation

@shangdahao
Copy link
Contributor

commented May 26, 2019

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

shang hui

@asvetlov asvetlov requested a review from pitrou May 29, 2019

@asvetlov

This comment has been minimized.

Copy link
Contributor

commented May 29, 2019

I'd like to get @pitrou review for pathlib changes.

@jaraco jaraco removed the request for review from pitrou Sep 11, 2019

@jaraco
jaraco approved these changes Sep 11, 2019
Copy link
Member

left a comment

Antoine is no longer reviewing pathlib, but I agree the approach here seems reasonable as does @brettcannon.

@pitrou

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

Antoine is no longer reviewing pathlib

Not entirely true, but I don't mind other people reviewing anyway :-)

@pitrou

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

Sounds fine on the principle, in any case.

@jaraco jaraco merged commit 088a09a into python:master Sep 11, 2019

5 checks passed

Azure Pipelines PR #20190529.3 succeeded
Details
bedevere/issue-number Issue number 31163 found
Details
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@miss-islington

This comment has been minimized.

Copy link

commented Sep 11, 2019

Thanks @shangdahao for the PR, and @jaraco for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒🤖

miss-islington added a commit to miss-islington/cpython that referenced this pull request Sep 11, 2019
bpo-31163: Added return values to pathlib.Path instance's rename and …
…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>
@bedevere-bot

This comment has been minimized.

Copy link

commented Sep 11, 2019

GH-15944 is a backport of this pull request to the 3.8 branch.

jaraco added a commit that referenced this pull request Sep 11, 2019
bpo-31163: Added return values to pathlib.Path instance's rename and …
…replace methods. (GH-13582) (GH-15944)

* 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>
vrpolakatcisco added a commit to vrpolakatcisco/cpython that referenced this pull request Sep 12, 2019
bpo-31163: Added return values to pathlib.Path instance's rename and …
…replace methods. (pythonGH-13582)

* bpo-31163: Added return values to pathlib.Path instance's rename and replace methods.
DinoV added a commit to DinoV/cpython that referenced this pull request Sep 12, 2019
bpo-31163: Added return values to pathlib.Path instance's rename and …
…replace methods. (pythonGH-13582)

* bpo-31163: Added return values to pathlib.Path instance's rename and replace methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.