]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
pathlib ABCs: remove caching of path parser case sensitivity (#130194)
authorBarney Gale <barney.gale@gmail.com>
Sun, 16 Feb 2025 17:08:55 +0000 (17:08 +0000)
committerGitHub <noreply@github.com>
Sun, 16 Feb 2025 17:08:55 +0000 (17:08 +0000)
commit655fc8a0fce3396fc1af3f7bc8f5c94ca8ec377d
treecca13f8aaa5987446356c5f2a48134f425e7ad01
parente7f00cd14f6a0c0dee6e733ac3e2c5d92e0809bb
pathlib ABCs: remove caching of path parser case sensitivity (#130194)

Remove the caching `_is_case_sensitive()` function.

The cache used to speed up `PurePath.[full_]match()` and `Path.[r]glob()`,
but that's no longer the case - these methods use
`self.parser is posixpath` to determine case sensitivity.

This makes the `pathlib._abc` module a little easier to backport to Python
3.8, where `functools.cache()` is unavailable.
Lib/pathlib/_abc.py