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

GH-77609: Support following symlinks inpathlib.Path.glob()#104176

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 commentedMay 4, 2023
edited
Loading

Add support for*** wildcard inpathlib.Path.glob() andrglob(). This wildcard works like**, except that it also recurses into symlinks.

SeeRecursive Globbing in thezshexpn manpage for prior art.

Alternative to#102616

@barneygale
Copy link
ContributorAuthor

Marking as a draft because it would be good to land#104292 and#104141 first.

@barneygalebarneygale marked this pull request as draftMay 8, 2023 14:47
@zooba
Copy link
Member

How does this help us fix the mixed up behaviour of the current function?

@barneygale
Copy link
ContributorAuthor

I don't think the current behaviour iswrong, just difficult to optimize. With this PR, users would be able to recursively walk symlinks, and we'd be able to optimize***/*.py later on (but not**/*.py). Still, I'm not convinced this is the right way forward.

@zooba
Copy link
Member

Still, I'm not convinced this is the right way forward.

I'm surprised, because you closed the other PR saying youwere convinced this was the way forward.

Personally, I preferred the other way. It's a bit more work, but in ~5 years time we'll have forgotten about it and will just have sensible defaults. Adding this way and leaving the other one leaves us with two warts (okay, maybe 1.5, if peoplelike this, but I feel like special patterns specifically for symlinks is too much).

@barneygale
Copy link
ContributorAuthor

Still, I'm not convinced this is the right way forward.

I'm surprised, because you closed the other PR saying youwere convinced this was the way forward.

I know. I literally changed my mind again last night while playing around with theglob() implementation! :P

Personally, I preferred the other way. It's a bit more work, but in ~5 years time we'll have forgotten about it and will just have sensible defaults. Adding this way and leaving the other one leaves us with two warts (okay, maybe 1.5, if peoplelike this, but I feel like special patterns specifically for symlinks is too much).

👍 fair point, thanks for the advice.

zooba reacted with thumbs up emoji

@barneygale
Copy link
ContributorAuthor

Closing in favour of#102616

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@barneygale@zooba@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp