Skip to content
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

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

Merged
merged 1 commit into from
May 31, 2023

Commits on May 30, 2023

  1. pythonGH-105113: Improve performance of pathlib.PurePath.match()

    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>
    3 people committed May 30, 2023
    Configuration menu
    Copy the full SHA
    b100cef View commit details
    Browse the repository at this point in the history