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-39682: makepathlib.Path immutable by removing (undocumented) support for "closing" a path by using it as a context manager#18846

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 8, 2020
edited by bedevere-bot
Loading

This implements@pitrou's suggestion of retaining support for using aPath object as a context manager, but making it a no-op.

https://bugs.python.org/issue39682

@the-knights-who-say-ni

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed thePSF contributor agreement (CLA).

CLA Missing

Our records indicate the following people have not signed the CLA:

@barneygale

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please followthe steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You cancheck yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

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.

+1 on the principle, but I don't think we should remove the test entirely, just change it.
Also, please add a NEWS entry. You can do so usingblurb orblurb-it.

@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-39682-pathlib-path-context-manager branch from626c970 toc89a62dCompareMarch 8, 2020 10:51
@barneygale
Copy link
ContributorAuthor

I have made the requested changes; please review again. Thank you!

@bedevere-bot
Copy link

Thanks for making the requested changes!

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

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.

+1. Have you signed the CLA?

@barneygale
Copy link
ContributorAuthor

I have! I think it's just making its way through the system currently.

@pitrou
Copy link
Member

Cool, thank you. I'll wait for the bot to notice, then :-)

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.

Quick request to document in the code why this change is being made, else someone else in the future may be wondering why it's a no-op.

@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-39682-pathlib-path-context-manager branch from19bea17 tob260194CompareMarch 10, 2020 00:05
@barneygale
Copy link
ContributorAuthor

Thank you Brett. I have made the requested changes; please review again. Hope the comment isn't too long.

@bedevere-bot
Copy link

Thanks for making the requested changes!

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

@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-39682-pathlib-path-context-manager branch from86cf4dc toca3acfdCompareMarch 21, 2020 01:50
@barneygale
Copy link
ContributorAuthor

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

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

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.

+1 for this, thank you@barneygale .
I'll leave this open a day or two in case people hold strong opinions about deprecating this silent behaviour.

@pitrou
Copy link
Member

@barneygale Can you rebase/merge from master to re-run CI on this?

…upport for "closing" a path by using it as a context manager.Support for using a path as a context manager remains, and is now a no-op.Co-Authored-By: Brett Cannon <54418+brettcannon@users.noreply.github.com>
@barneygalebarneygaleforce-pushed thebpo-39682-pathlib-path-context-manager branch fromca3acfd to31c116aCompareMarch 29, 2020 19:34
@barneygale
Copy link
ContributorAuthor

Rebased on master. Thanks@pitrou and@brettcannon for helping get this through :)

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
Copy link
Contributor

@aerosaeros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks@barneygale; LGTM.

@brettcannon
Copy link
Member

brettcannon commentedMar 30, 2020
edited
Loading

I have an opinion about deprecation, but it isn't strong. 😄 Basically I'm worried someone out there is relying on this functionality and is going to be caught off-guard that it suddenly stopped working. But as I said, I'm +0 on the deprecation so I won't hold up the PR if people disagree.

@barneygale
Copy link
ContributorAuthor

barneygale commentedApr 3, 2020
edited
Loading

Just noting that I have a follow-up PR -#19342 - that removes the_init() method that was touched by this PR.

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

@pitroupitroupitrou approved these changes

@aerosaerosaeros approved these changes

@brettcannonbrettcannonAwaiting requested review from brettcannon

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@barneygale@the-knights-who-say-ni@bedevere-bot@pitrou@brettcannon@aeros

[8]ページ先頭

©2009-2025 Movatter.jp