-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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-39950: add pathlib.Path.hardlink_to()
method that supersedes link_to()
#18909
bpo-39950: add pathlib.Path.hardlink_to()
method that supersedes link_to()
#18909
Conversation
The issue was closed as a duplicate so I would prefer closing the PR. Thanks. |
pathlib.Path.hardlink_to()
method that supersedes link_to()
pathlib.Path.hardlink_to()
method that supersedes link_to()
I've logged a new bug after some discussion on the python-dev mailing list: https://bugs.python.org/issue39950 |
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.
Some doc restructuring and also making sure the public API doesn't break due to this.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
248c6e8
to
430b7f7
Compare
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.
This looks mostly good. Just two comments.
Also, can you rebase/merge from master?
b32aaa6
to
b7c8ab2
Compare
ec1bea4
to
a65799e
Compare
pathlib.Path.hardlink_to()
method that supersedes link_to()
pathlib.Path.hardlink_to()
method that supersedes link_to()
Marking as WIP as I'll address bpo-42999 first. |
de0b686
to
2dfa391
Compare
pathlib.Path.hardlink_to()
method that supersedes link_to()
pathlib.Path.hardlink_to()
method that supersedes link_to()
Removed 'WIP' from the title. This is ready to review again! Thanks all. |
@barneygale please see #18909 (comment) on how to ask for a new round of reviews. |
I have made the requested changes; please review again |
Thanks for making the requested changes! @brettcannon: please review the changes made to this pull request. |
LGTM! @barneygale are you up for writing the "What's New" entry to document the addition of the |
I've added a new commit - hope it looks alright? |
…ink_to()` The argument order of `link_to()` is reversed, so: a.link_to(b) Might be expected to create *a* as a link to *b*, in fact it creates *b* as a link to *a*. This doesn't match `symlink_to()` nor the documentation and doesn't seem to be the original author's intent. This commit deprecates `link_to()` and introduces `hardlink_to()`, which has the same argument order as `symlink_to()`.
94c5acb
to
e506cae
Compare
@brettcannon sorry to bother, just bumping this review as I saw there's a feature freeze in two weeks! Thanks. |
@barneygale yep, this is the top of my review queue and I'm hoping to get to it this Friday (steering council stuff has to take priority, unfortunately). |
@barneygale Thanks! |
Thanks so much for the review! :-) |
The argument order of
link_to()
is reversed compared to what one may expect, so:Might be expected to create a as a link to b, in fact it creates b as a link to a, making it function more like a "link from". This doesn't match
symlink_to()
nor the documentation and doesn't seem to be the original author's intent.This PR deprecates
link_to()
and introduceshardlink_to()
, which has the same argument order assymlink_to()
.https://bugs.python.org/issue39950
Automerge-Triggered-By: GH:brettcannon