]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-130614: pathlib ABCs: support alternate separator in `full_match()` (#130991)
authorBarney Gale <barney.gale@gmail.com>
Sun, 9 Mar 2025 16:36:59 +0000 (16:36 +0000)
committerGitHub <noreply@github.com>
Sun, 9 Mar 2025 16:36:59 +0000 (16:36 +0000)
commitbbd6d17ef85e5de885cdfab0ae567184ba1550ff
treed88a51395eab6992fd37cee7a1de597fc94fb208
parentba64cc5db410a893e6ff5bfee9210207947b69c2
GH-130614: pathlib ABCs: support alternate separator in `full_match()` (#130991)

In `pathlib.types._JoinablePath.full_match()`, treat alternate path
separators in the path and pattern as if they were primary separators. e.g.
if the parser is `ntpath`, then `P(r'foo/bar\baz').full_match(r'*\*/*')` is
true.
Lib/glob.py
Lib/pathlib/types.py