summaryrefslogtreecommitdiff
path: root/django/db/models/utils.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2021-09-27 09:10:58 +0200
committerGitHub <noreply@github.com>2021-09-27 09:10:58 +0200
commit5bac1719a2fcbee5cb8b9e22c3480e3a24ed6c4c (patch)
tree52fa4da11d16e934345efbbac1b8dde9b85ff876 /django/db/models/utils.py
parent840ad06300ac38e0e0e18ea36d6969cc03c875a9 (diff)
downloaddjango-5bac1719a2fcbee5cb8b9e22c3480e3a24ed6c4c.tar.gz
Refs #32355 -- Used @functools.lru_cache as a straight decorator.
Diffstat (limited to 'django/db/models/utils.py')
-rw-r--r--django/db/models/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/utils.py b/django/db/models/utils.py
index a8bd20fba7..949c528469 100644
--- a/django/db/models/utils.py
+++ b/django/db/models/utils.py
@@ -38,9 +38,9 @@ def unpickle_named_row(names, values):
return create_namedtuple_class(*names)(*values)
-@functools.lru_cache()
+@functools.lru_cache
def create_namedtuple_class(*names):
- # Cache type() with @lru_cache() since it's too slow to be called for every
+ # Cache type() with @lru_cache since it's too slow to be called for every
# QuerySet evaluation.
def __reduce__(self):
return unpickle_named_row, (names, tuple(self))