Skip to content
Myr

don't create a third queue

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

authored by David Lord · committed by David Lord · parent 39d2e22 · Browse files · 3 files+5 added−5 removed
This commit

State

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

Diff stats

3 files+5 added−5 removed

  • tests:+2 added−1 removed
  • other:+3 added−4 removed

3 files+5 added−5 removed

modified:jinja2/utils.py+1 added-2 removed
338 unmodified lines
339 def copy(self):340 """Return a shallow copy of the instance."""341 rv = self.__class__(self.capacity)342 rv._mapping.update(self._mapping)343 rv._queue = deque(self._queue)344 rv._postinit()343 rv._queue.extend(self._queue)344 return rv345346 def get(self, key, default=None):347 """Return an item from the cache dict or `default`"""
322 unmodified lines
modified:tests/test_utils.py+2 added-1 removed
15 unmodified lines
1617import pytest1819from jinja2._compat import string_types, range_type20from jinja2.utils import LRUCache, escape, object_type_repr, urlize, \20from jinja2.utils import LRUCache, object_type_repr, urlize, \21 select_autoescape, generate_lorem_ipsum, missing, consume22from markupsafe import Markup232425@pytest.mark.utils26@pytest.mark.lrucache27class TestLRUCache(object):28
182 unmodified lines
modified:CHANGES.rst+2 added-2 removed
53 unmodified lines
54 :issue:`870`55- :class:`~nativetypes.NativeTemplate` correctly handles quotes56 between expressions. ``"'{{ a }}', '{{ b }}'"`` renders as the tuple57 ``('1', '2')`` rather than the string ``'1, 2'``. :issue:`1020`58- ``LRUCache.copy()`` correctly re-initializes the queue methods59 after copying. :issue:`843`58- After calling ``LRUCache.copy()``, the copy's queue methods point to59 the correct queue. :issue:`843`606162Version 2.10.363--------------
629 unmodified lines