-
-
Notifications
You must be signed in to change notification settings - Fork 32k
GH-73435: Implement recursive wildcards in pathlib.PurePath.match()
#101398
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
Merged
barneygale
merged 40 commits into
python:main
from
barneygale:gh-73435-pathlib-match-recursive
May 30, 2023
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
608e917
gh-73435: Implement recursive wildcards in pathlib.PurePath.match()
barneygale 9a43c7f
Simplify code slightly
barneygale a846279
Fix support for newlines
barneygale bbd8cd6
Cache translation of individual components
barneygale b5c002e
Drop 'recursive' argument, make this the only behaviour.
barneygale 0afcd54
Undo modifications to fnmatch.py
barneygale fe32717
Merge branch 'main' into gh-73435-pathlib-match-recursive
barneygale 7b6f850
Fix Windows support
barneygale 037488a
Tidy up code.
barneygale 0741950
Add news blurb.
barneygale e1c9731
Merge branch 'main' into gh-73435-pathlib-match-recursive
barneygale db6f0ad
Merge branch 'main' into gh-73435-pathlib-match-recursive
barneygale 8dff9e2
Merge branch 'main' into gh-73435-pathlib-match-recursive
barneygale 314679f
Simplify patch; prepare for use in `glob()`
barneygale 90eebcc
Make better use of path object caching.
barneygale 4b5fffd
Add performance tip to docs
barneygale 5e8bc28
Skip re-initialisation of PurePath patterns.
barneygale e81ab5a
Merge branch 'main' into gh-73435-pathlib-match-recursive
barneygale afb8047
Merge branch 'main' into gh-73435-pathlib-match-recursive
barneygale 722a1ab
Use `re.IGNORECASE` rather than `os.path.normcase()`
barneygale 0ccf3df
Merge branch 'main' into gh-73435-pathlib-match-recursive
barneygale ccea5e1
Add whats new entry
barneygale dd04294
Update Doc/whatsnew/3.12.rst
barneygale b258641
Apply suggestions from code review
barneygale ced8998
Explain _FNMATCH_SLICE
barneygale a33c7b6
Accidentally a word.
barneygale 4b3bddb
Cache pattern compilation
barneygale 6ad30dd
Remove unneeded `from None` suffix, whoops.
barneygale 052890f
Tiny performance improvement: avoid accessing path.parts
barneygale d789b6d
Typo fix
barneygale 4fe77c6
Avoid hashing path object when compiling pattern.
barneygale 4770c13
More performance tweaks
barneygale 559787d
Merge branch 'main' into gh-73435-pathlib-match-recursive
barneygale 9c09fc4
Merge branch 'main' into gh-73435-pathlib-match-recursive
barneygale eb35dbc
Re-target to 3.13.
barneygale 8959dfd
Merge branch 'main' into gh-73435-pathlib-match-recursive
barneygale fec7702
Merge branch 'main' into gh-73435-pathlib-match-recursive
barneygale 89bc380
Merge branch 'main' into gh-73435-pathlib-match-recursive
barneygale 9211297
Add more comments!
barneygale 73bb309
Update Lib/pathlib.py
barneygale File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
1 change: 1 addition & 0 deletions
1
Misc/NEWS.d/next/Library/2023-02-17-18-56-46.gh-issue-73435.7sTJHk.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add support for recursive wildcards in :meth:`pathlib.PurePath.match`. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.