]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-101360: Fix anchor matching in pathlib.PureWindowsPath.match() (GH-101363)
authorBarney Gale <barney.gale@gmail.com>
Fri, 17 Feb 2023 14:05:38 +0000 (14:05 +0000)
committerGitHub <noreply@github.com>
Fri, 17 Feb 2023 14:05:38 +0000 (14:05 +0000)
commitd401b20630965c0e1d2a5a0d60d5fc51aa5a8d80
treee2401d36917725d2bede97de574ccfd906f84a60
parent775f8819e319127f9bfb046773b74bcc62c68b6a
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.
Lib/pathlib.py
Lib/test/test_ntpath.py
Lib/test/test_pathlib.py
Misc/NEWS.d/next/Library/2023-01-27-02-53-50.gh-issue-101360.bPB7SL.rst [new file with mode: 0644]