[issue42799] Please document fnmatch LRU cache size (256) and suggest alternatives

2021-07-15 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker ___

[issue42799] Please document fnmatch LRU cache size (256) and suggest alternatives

2021-07-15 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset b39eea06d148887dd91a3612febafbddda760593 by andrei kulakov in branch 'main': bpo-42799: fnmatch module: bump up size of lru_cache for patterns (GH-27084) https://github.com/python/cpython/commit/b39eea06d148887dd91a3612febafbddda760593

[issue42799] Please document fnmatch LRU cache size (256) and suggest alternatives

2021-07-10 Thread Andrei Kulakov
Andrei Kulakov added the comment: I've put up the PR here: https://github.com/python/cpython/pull/27084/files -- ___ Python tracker ___

[issue42799] Please document fnmatch LRU cache size (256) and suggest alternatives

2021-07-10 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch nosy: +andrei.avk nosy_count: 2.0 -> 3.0 pull_requests: +25632 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27084 ___ Python tracker

[issue42799] Please document fnmatch LRU cache size (256) and suggest alternatives

2020-12-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: In addition to documenting the cache size, consider a substantial increase to the limit. Compiled regex patterns tend to be very small. We can afford to have a lot of them (tens of thousands seems reasonable to me). Regarding the suggested

[issue42799] Please document fnmatch LRU cache size (256) and suggest alternatives

2020-12-31 Thread Josh Triplett
New submission from Josh Triplett : fnmatch translates shell patterns to regexes, using an LRU cache of 256 elements. The documentation doesn't mention the cache size, just "They cache the compiled regular expressions for speed.". Without this knowledge, it's possible to get pathologically