-
-
Notifications
You must be signed in to change notification settings - Fork 32k
GH-89769: Pathlib - do not follow links when checking for precise glob match #29655
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
GH-89769: Pathlib - do not follow links when checking for precise glob match #29655
Conversation
This PR is stale because it has been open for 30 days with no activity. |
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.
Works on my Ubuntu and I see bot tests are ok, so ok with me.
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.
Change looks good! Could you fix conflicts please?
Misc/NEWS.d/next/Library/2021-11-19-23-37-18.bpo-45606.UW5XE1.rst
Outdated
Show resolved
Hide resolved
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 |
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Barney Gale <barney.gale@gmail.com>
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.
Last nit. Thanks!
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Thanks again, @akulakov |
Thanks @barneygal A3F2 e for the review and merging! |
https://bugs.python.org/issue45606
I've also added a follow_symlinks arg to
exists()
method because it seems more logical to be able to test if a path exists via the same method rather than having to also remember and to check for it being a symlink. This is also consistent with a few other Path methods; and it makes it more explicit and clearer that by defaultexists()
follows symlinks, by looking at its signature (otherwise this may be a surprising behaviour).