diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2017-01-18 21:30:21 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-01-18 21:42:40 -0500 |
| commit | 3cc5f01d9bd52930cec3c08d6ec7e19d0c2a6489 (patch) | |
| tree | fa14ed86804a78c91cf62dfeba328cdf6d43359e /django/apps/registry.py | |
| parent | 2b281cc35ed9d997614ca3c416928d7fabfef1ad (diff) | |
Refs #23919 -- Stopped using django.utils.lru_cache().
Diffstat (limited to 'django/apps/registry.py')
| -rw-r--r-- | django/apps/registry.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/apps/registry.py b/django/apps/registry.py index 453e4d42f6..c67c5ee0ba 100644 --- a/django/apps/registry.py +++ b/django/apps/registry.py @@ -1,3 +1,4 @@ +import functools import sys import threading import warnings @@ -5,7 +6,6 @@ from collections import Counter, OrderedDict, defaultdict from functools import partial from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured -from django.utils import lru_cache from .config import AppConfig @@ -156,7 +156,7 @@ class Apps(object): raise LookupError(message) # This method is performance-critical at least for Django's test suite. - @lru_cache.lru_cache(maxsize=None) + @functools.lru_cache(maxsize=None) def get_models(self, include_auto_created=False, include_swapped=False): """ Returns a list of all installed models. @@ -268,7 +268,7 @@ class Apps(object): "Model '%s.%s' not registered." % (app_label, model_name)) return model - @lru_cache.lru_cache(maxsize=None) + @functools.lru_cache(maxsize=None) def get_swappable_settings_name(self, to_string): """ For a given model string (e.g. "auth.User"), return the name of the |
