Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…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.
barneygale commentedJul 3, 2023
barneygale commentedJul 3, 2023
Thanks v much Steve! |
miss-islington commentedJul 3, 2023
Thanks@barneygale for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
miss-islington commentedJul 3, 2023
Sorry@barneygale, I had trouble checking out the |
…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 commentedJul 3, 2023
GH-106372 is a backport of this pull request to the3.12 branch. |
Uh oh!
There was an error while loading.Please reload this page.
We match paths using the
_linesattribute, 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.pathlib.PurePath.match()can incorrectly match empty path #106330