Skip to content

Conversation

@barneygale
Copy link
Contributor

@barneygale barneygale commented Feb 16, 2025

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.

Remove the caching `_is_case_sensitive()` function. This makes the
`pathlib._abc` module a little easier to backport to Python 3.8, where
`functools.cache()` is unavailable.

This has no effect on `pathlib.PurePath` nor `Path`; these classes use
`self.parser is posixpath` to detect case sensitivity.
@barneygale barneygale merged commit 655fc8a into python:main Feb 16, 2025
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant