Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-39950: addpathlib.Path.hardlink_to() method that supersedeslink_to()#18909

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@barneygale
Copy link
Contributor

@barneygalebarneygale commentedMar 11, 2020
edited by miss-islington
Loading

The argument order oflink_to() is reversed compared to what one may expect, so:

a.link_to(b)

Might be expected to createa as a link tob, in fact it createsb as a link toa, making it function more like a "link from". This doesn't matchsymlink_to() nor the documentation and doesn't seem to be the original author's intent.

This PR deprecateslink_to() and introduceshardlink_to(), which has the same argument order assymlink_to().

https://bugs.python.org/issue39950

Automerge-Triggered-By: GH:brettcannon

escape0707 reacted with thumbs up emojiescape0707 reacted with heart emoji
@tirkarthi
Copy link
Member

The issue was closed as a duplicate so I would prefer closing the PR. Thanks.

@barneygalebarneygale changed the titlebpo-39925: addpathlib.Path.hardlink_to() method that supersedeslink_to()bpo-39950: addpathlib.Path.hardlink_to() method that supersedeslink_to()Mar 13, 2020
@barneygale
Copy link
ContributorAuthor

I've logged a new bug after some discussion on the python-dev mailing list:https://bugs.python.org/issue39950

Copy link
Member

@brettcannonbrettcannon left a 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.

@bedevere-bot
Copy link

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 phraseI have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@barneygalebarneygaleforce-pushed thebpo-39925-pathlib-path-hard-link-arg-order branch from248c6e8 to430b7f7CompareMarch 21, 2020 02:09
Copy link
Member

@pitroupitrou left a 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?

@barneygalebarneygaleforce-pushed thebpo-39925-pathlib-path-hard-link-arg-order branch fromb32aaa6 tob7c8ab2CompareMay 29, 2020 01:27
@barneygalebarneygaleforce-pushed thebpo-39925-pathlib-path-hard-link-arg-order branch 2 times, most recently fromec1bea4 toa65799eCompareJanuary 22, 2021 00:41
@barneygalebarneygale changed the titlebpo-39950: addpathlib.Path.hardlink_to() method that supersedeslink_to()WIP: bpo-39950: addpathlib.Path.hardlink_to() method that supersedeslink_to()Jan 22, 2021
@barneygale
Copy link
ContributorAuthor

Marking as WIP as I'll addressbpo-42999 first.

escape0707 reacted with heart emojiescape0707 reacted with rocket emoji

@barneygalebarneygaleforce-pushed thebpo-39925-pathlib-path-hard-link-arg-order branch 2 times, most recently fromde0b686 to2dfa391CompareApril 7, 2021 17:02
@barneygalebarneygale changed the titleWIP: bpo-39950: addpathlib.Path.hardlink_to() method that supersedeslink_to()bpo-39950: addpathlib.Path.hardlink_to() method that supersedeslink_to()Apr 7, 2021
@barneygale
Copy link
ContributorAuthor

Removed 'WIP' from the title. This is ready to review again! Thanks all.

escape0707 reacted with thumbs up emoji

@brettcannon
Copy link
Member

@barneygale please see#18909 (comment) on how to ask for a new round of reviews.

barneygale and escape0707 reacted with thumbs up emoji

@barneygale
Copy link
ContributorAuthor

I have made the requested changes; please review again

escape0707 reacted with thumbs up emojiescape0707 reacted with rocket emoji

@bedevere-bot
Copy link

Thanks for making the requested changes!

@brettcannon: please review the changes made to this pull request.

@brettcannon
Copy link
Member

LGTM!

@barneygale are you up for writing the "What's New" entry to document the addition of thehardlink_to() and the deprecation oflink_to()? It's okay if you're not, but it simplifies things for the release if it's updated now.

@barneygale
Copy link
ContributorAuthor

LGTM!

@barneygale are you up for writing the "What's New" entry to document the addition of thehardlink_to() and the deprecation oflink_to()? It's okay if you're not, but it simplifies things for the release if it's updated now.

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 documentationand doesn't seem to be the original author's intent.This commit deprecates `link_to()` and introduces `hardlink_to()`, whichhas the same argument order as `symlink_to()`.
@barneygalebarneygaleforce-pushed thebpo-39925-pathlib-path-hard-link-arg-order branch from94c5acb toe506caeCompareApril 13, 2021 02:00
@barneygalebarneygale requested a review frompitrouApril 13, 2021 10:44
@barneygale
Copy link
ContributorAuthor

@brettcannon sorry to bother, just bumping this review as I saw there's a feature freeze in two weeks! Thanks.

@brettcannon
Copy link
Member

@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).

@brettcannon
Copy link
Member

@barneygale Thanks!

escape0707 reacted with heart emojiescape0707 reacted with rocket emoji

@barneygale
Copy link
ContributorAuthor

Thanks so much for the review! :-)

escape0707 reacted with heart emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@brettcannonbrettcannonbrettcannon approved these changes

@pitroupitrouAwaiting requested review from pitrou

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@barneygale@tirkarthi@bedevere-bot@brettcannon@pitrou@the-knights-who-say-ni@miss-islington

[8]ページ先頭

©2009-2025 Movatter.jp