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-106330: Fix matching of empty path inpathlib.PurePath.match()#106331

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

Merged

Conversation

@barneygale
Copy link
Contributor

@barneygalebarneygale commentedJul 2, 2023
edited by bedevere-bot
Loading

We match paths using the_lines attribute, which is derived from the path's string representation. The bug arises because an empty path's string representation is'.' (not''), which is matched by the'*' wildcard.

…h()`We match paths using the `_lines` attribute, which is derived from thepath's string representation. The bug arises because an empty path's stringrepresentation is `'.'` (not `''`), which is matched by the `'*'` wildcard.
@barneygalebarneygale requested a review fromzoobaJuly 3, 2023 19:36
@barneygale
Copy link
ContributorAuthor

@zooba I've requested your review as this relates back to#101398. Thank you for your consideration :]

@barneygale
Copy link
ContributorAuthor

Thanks v much Steve!

@barneygalebarneygale merged commitb4efdf8 intopython:mainJul 3, 2023
@miss-islington
Copy link
Contributor

Thanks@barneygale for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington
Copy link
Contributor

Sorry@barneygale, I had trouble checking out the3.12 backport branch.
Please retry by removing and re-adding the "needs backport to 3.12" label.
Alternatively, you can backport usingcherry_picker on the command line.
cherry_picker b4efdf8cda8fbbd0ca53b457d5f6e46a59348caf 3.12

barneygale added a commit to barneygale/cpython that referenced this pull requestJul 3, 2023
…th.match()` (pythonGH-106331)We match paths using the `_lines` attribute, which is derived from thepath's string representation. The bug arises because an empty path's stringrepresentation is `'.'` (not `''`), which is matched by the `'*'` wildcard.(cherry picked from commitb4efdf8)Co-authored-by: Barney Gale <barney.gale@gmail.com>
@bedevere-bot
Copy link

GH-106372 is a backport of this pull request to the3.12 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.12only security fixes labelJul 3, 2023
barneygale added a commit that referenced this pull requestJul 4, 2023
…ch()` (GH-106331) (GH-106372)We match paths using the `_lines` attribute, which is derived from thepath's string representation. The bug arises because an empty path's stringrepresentation is `'.'` (not `''`), which is matched by the `'*'` wildcard.(cherry picked from commitb4efdf8)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@zoobazoobazooba approved these changes

Assignees

@barneygalebarneygale

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@barneygale@miss-islington@bedevere-bot@zooba

[8]ページ先頭

©2009-2025 Movatter.jp