From 53c403876d7db1fcc7f00238bc5d96760bda1268 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Sat, 14 Jan 2023 01:18:48 +0000 Subject: [PATCH] =?UTF-8?q?Update=20functools=5Flru=5Fcache=201.6.1=20(2dc?= =?UTF-8?q?65b5)=20=E2=86=92=201.6.2=20(2405ed1).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 1 + lib/backports/functools_lru_cache/__init__.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 15e18ccb..11de9ac4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,7 @@ * Update chardet packages 4.0.0 (b3d867a) to 5.1.0 (8087f00) * Update diskcache 5.1.0 (40ce0de) to 5.4.0 (1cb1425) * Update feedparser 6.0.1 (98d189fa) to 6.0.10 (5fcb3ae) +* Update functools_lru_cache 1.6.1 (2dc65b5) to 1.6.2 (2405ed1) * Update humanize 3.5.0 (b6b0ea5) to 4.0.0 (a1514eb) * Update Js2Py 0.70 (92250a4) to 0.74 (2e017b8) * Update pyjsparser 2.7.1 (5465d03) to 2.7.1 (cbd1e05) diff --git a/lib/backports/functools_lru_cache/__init__.py b/lib/backports/functools_lru_cache/__init__.py index e0b19d95..8be4515f 100644 --- a/lib/backports/functools_lru_cache/__init__.py +++ b/lib/backports/functools_lru_cache/__init__.py @@ -4,7 +4,7 @@ import functools from collections import namedtuple from threading import RLock -_CacheInfo = namedtuple("CacheInfo", ["hits", "misses", "maxsize", "currsize"]) +_CacheInfo = namedtuple("_CacheInfo", ["hits", "misses", "maxsize", "currsize"]) @functools.wraps(functools.update_wrapper) @@ -63,7 +63,7 @@ def _make_key( return _HashedSeq(key) -def lru_cache(maxsize=100, typed=False): +def lru_cache(maxsize=100, typed=False): # noqa: C901 """Least-recently-used cache decorator. If *maxsize* is set to None, the LRU features are disabled and the cache @@ -136,7 +136,7 @@ def lru_cache(maxsize=100, typed=False): if link is not None: # record recent use of the key by moving it # to the front of the list - root, = nonlocal_root + (root,) = nonlocal_root link_prev, link_next, key, result = link link_prev[NEXT] = link_next link_next[PREV] = link_prev @@ -148,7 +148,7 @@ def lru_cache(maxsize=100, typed=False): return result result = user_function(*args, **kwds) with lock: - root, = nonlocal_root + (root,) = nonlocal_root if key in cache: # getting here means that this same key was added to the # cache while the lock was released. since the link