diff options
| author | Tim Graham <timograham@gmail.com> | 2014-11-24 08:36:10 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-01-17 07:55:32 -0500 |
| commit | 61ad1ea92b1f4df992b0ef1dcc7c781da2413815 (patch) | |
| tree | 31055271da9c5d45e1befbec6d06bfbeda95c4e8 /django/utils/functional.py | |
| parent | 9ce36512fa925231b0496cc10f7d114c069c7c06 (diff) | |
Removed django.utils.functional.memoize per deprecation timeline.
refs #21351.
Diffstat (limited to 'django/utils/functional.py')
| -rw-r--r-- | django/utils/functional.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/django/utils/functional.py b/django/utils/functional.py index aa0d6f850a..9e4df4b2f7 100644 --- a/django/utils/functional.py +++ b/django/utils/functional.py @@ -2,10 +2,8 @@ import copy import operator from functools import wraps import sys -import warnings from django.utils import six -from django.utils.deprecation import RemovedInDjango19Warning from django.utils.six.moves import copyreg @@ -18,29 +16,6 @@ def curry(_curried_func, *args, **kwargs): return _curried -def memoize(func, cache, num_args): - """ - Wrap a function so that results for any argument tuple are stored in - 'cache'. Note that the args to the function must be usable as dictionary - keys. - - Only the first num_args are considered when creating the key. - """ - warnings.warn("memoize wrapper is deprecated and will be removed in " - "Django 1.9. Use django.utils.lru_cache instead.", - RemovedInDjango19Warning, stacklevel=2) - - @wraps(func) - def wrapper(*args): - mem_args = args[:num_args] - if mem_args in cache: - return cache[mem_args] - result = func(*args) - cache[mem_args] = result - return result - return wrapper - - class cached_property(object): """ Decorator that converts a method with a single self argument into a |
