diff options
author | Barney Gale <barney.gale@gmail.com> | 2023-02-17 14:05:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-17 14:05:38 (GMT) |
commit | d401b20630965c0e1d2a5a0d60d5fc51aa5a8d80 (patch) | |
tree | e2401d36917725d2bede97de574ccfd906f84a60 /Misc | |
parent | 775f8819e319127f9bfb046773b74bcc62c68b6a (diff) | |
download | cpython-d401b20630965c0e1d2a5a0d60d5fc51aa5a8d80.zip cpython-d401b20630965c0e1d2a5a0d60d5fc51aa5a8d80.tar.gz cpython-d401b20630965c0e1d2a5a0d60d5fc51aa5a8d80.tar.bz2 |
gh-101360: Fix anchor matching in pathlib.PureWindowsPath.match() (GH-101363)
Use `fnmatch` to match path and pattern anchors, just as we do for other
path parts. This allows patterns such as `'*:/Users/*'` to be matched.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2023-01-27-02-53-50.gh-issue-101360.bPB7SL.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2023-01-27-02-53-50.gh-issue-101360.bPB7SL.rst b/Misc/NEWS.d/next/Library/2023-01-27-02-53-50.gh-issue-101360.bPB7SL.rst new file mode 100644 index 0000000..4cfb136 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-01-27-02-53-50.gh-issue-101360.bPB7SL.rst @@ -0,0 +1,3 @@ +Fix anchor matching in :meth:`pathlib.PureWindowsPath.match`. Path and +pattern anchors are now matched with :mod:`fnmatch`, just like other path +parts. This allows patterns such as ``"*:/Users/*"`` to be matched. |