FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-106330: Fix matching of empty path in `pathlib.PurePath.match()` by barneygale · Pull Request #106331 · python/cpython · GitHub

/ cpython Public

GH-106330: Fix matching of empty path in pathlib.PurePath.match() - #106331

Merged
barneygale merged 2 commits into
python:mainfrom
barneygale:gh-106330-fix-match-empty-path
Jul 3, 2023
Merged

GH-106330: Fix matching of empty path in pathlib.PurePath.match()#106331
barneygale merged 2 commits into
python:mainfrom
barneygale:gh-106330-fix-match-empty-path

Conversation

barneygale commented Jul 2, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

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 the
path's string representation. The bug arises because an empty path's string
representation is `'.'` (not `''`), which is matched by the `'*'` wildcard.
barneygale requested a review from zooba July 3, 2023 19:36

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor Author

Thanks v much Steve!

barneygale merged commit b4efdf8 into python:main Jul 3, 2023

Copy link
Copy Markdown
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!

Copy link
Copy Markdown
Contributor

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

barneygale added a commit to barneygale/cpython that referenced this pull request Jul 3, 2023
…th.match()` (pythonGH-106331)

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.
(cherry picked from commit b4efdf8)

Co-authored-by: Barney Gale <barney.gale@gmail.com>

Copy link
Copy Markdown

GH-106372 is a backport of this pull request to the 3.12 branch.

bedevere-bot removed the needs backport to 3.12 only security fixes label Jul 3, 2023
barneygale added a commit that referenced this pull request Jul 4, 2023
…ch()` (GH-106331) (GH-106372)

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.
(cherry picked from commit b4efdf8)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL