Skip to content
Myr

Made the lru cache more robust.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent b404439 · Browse files · 1 file+6 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−2 removed

  • other:+6 added−2 removed

1 file+6 added−2 removed

modified:jinja2/utils.py+6 added-2 removed
611 unmodified lines
612 rv = self._mapping[key]613 if self._queue[-1] != key:614 try:615 self._remove(key)616 except:616 except ValueError:617 # if something removed the key from the container618 # when we read, ignore the ValueError that we would619 # get otherwise.620 pass
21 unmodified lines
642 """643 self._wlock.acquire()644 try:645 del self._mapping[key]646 try:646 self._remove(key)647 self._remove(key)648 except ValueError:649 # __getitem__ is not locked, it might happen650 pass651 finally:652 self._wlock.release()653654 def items(self):
126 unmodified lines