-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-39906: add follow_symlinks parameter to pathlib.Path.stat() and chmod() #18864
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-39906: add follow_symlinks parameter to pathlib.Path.stat() and chmod() #18864
Conversation
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 the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
a0720ed
to
3ede281
Compare
7782e14
to
7f5854a
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.
The addition looks good on the principle. Two comments though. Also, you'll need to rebase / merge from master.
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 |
@barneygale, please address the review comments. Thank you! |
7f5854a
to
e9b6598
Compare
Rebased + docs versions fixed |
I have made the requested changes; please review again |
Thanks for making the requested changes! @pitrou: please review the changes made to this pull request. |
This is great, thanks. Not sure whether it's out of scope for this PR, but it might also be nice to add the |
e9b6598
to
2cc9f3b
Compare
@pitrou bumping this one! Think it's ready for review if you have the time |
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.
Sorry for the slow reviews. This looks fine to me, except it'll land in 3.10, and so the docs need to be updated to reflect that.
2cc9f3b
to
163742d
Compare
Thanks for the review - I've updated the |
Just an FYI @barneygale, we squash merge at the end, so there's no need to rebase and force push PRs (merging and regular push is fine). All it does is break the review history. |
Good to know, thank you. |
Backwards-compatible change that makes this work:
This brings pathlib in line with the newish
follow_symlinks
parameters inos
functions, and arguably provides a more explicit (and nicer?) interface.For consistency I've applied the same change to
chmod()
, though as far as I can tell, changing permissions on symlinks is only available on some BSDs (see bpo-7479)https://bugs.python.org/issue39906