New submission from Andrew Clegg <a...@pml.ac.uk>:

The fnmatch module has a cache of translation between glob patterns and 
compiled regular expressions. However this cache is never emptied; only added 
to. I am writing a python program which as part of its execution checks 
millions of unique globs - this causes the fnmatch cache to grow enormous.

Attached is a patch to limit the size of the fnmatch cache to 100 (chosen to be 
the same size as the re module).

----------
components: Library (Lib)
files: fnmatch.patch
keywords: patch
messages: 98786
nosy: andrewclegg
severity: normal
status: open
title: Fnmatch cache is never cleared during usage
versions: Python 2.5
Added file: http://bugs.python.org/file16116/fnmatch.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7846>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to