Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ def make_uri(self, path):
# Globbing helpers
#

@functools.lru_cache()
def _make_selector(pattern_parts, flavour):
pat = pattern_parts[0]
child_parts = pattern_parts[1:]
Expand All @@ -215,9 +216,6 @@ def _make_selector(pattern_parts, flavour):
cls = _PreciseSelector
return cls(pat, child_parts, flavour)

if hasattr(functools, "lru_cache"):
_make_selector = functools.lru_cache()(_make_selector)


class _Selector:
"""A selector matches a specific glob pattern part against the children
Expand Down