SIGN IN SIGN UP

[3.12] GH-105113: Improve performance of `pathlib.PurePath.match()` (GH-105114)

We now compile a `re.Pattern` object for the entire pattern. This is made
more difficult by `fnmatch` not treating directory separators as special
when evaluating wildcards (`*`, `?`, etc), and so we arrange the path parts
onto separate *lines* in a string, and ensure we don't set `re.DOTALL`.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
B
Barney Gale committed
e7cb216339e8aa8d00f7f55f9e37864b1720ca0f
Parent: 076f3cd
Committed by GitHub <noreply@github.com> on 5/31/2023, 8:37:37 PM