mirror of
https://github.com/django/django.git
synced 2025-09-16 23:45:38 +00:00
Refs #20223 -- Removed deprecated django.utils.functional.allow_lazy().
This commit is contained in:
parent
7e63e84572
commit
9d304b26cf
4 changed files with 3 additions and 31 deletions
|
@ -1,10 +1,8 @@
|
|||
import copy
|
||||
import operator
|
||||
import warnings
|
||||
from functools import total_ordering, wraps
|
||||
|
||||
from django.utils import six
|
||||
from django.utils.deprecation import RemovedInDjango20Warning
|
||||
|
||||
|
||||
# You can't trivially replace this with `functools.partial` because this binds
|
||||
|
@ -189,14 +187,6 @@ def lazystr(text):
|
|||
return lazy(force_text, six.text_type)(text)
|
||||
|
||||
|
||||
def allow_lazy(func, *resultclasses):
|
||||
warnings.warn(
|
||||
"django.utils.functional.allow_lazy() is deprecated in favor of "
|
||||
"django.utils.functional.keep_lazy()",
|
||||
RemovedInDjango20Warning, 2)
|
||||
return keep_lazy(*resultclasses)(func)
|
||||
|
||||
|
||||
def keep_lazy(*resultclasses):
|
||||
"""
|
||||
A decorator that allows a function to be called with one or more lazy
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue