Refs #27753 -- Removed django.utils.functional.curry().

This commit is contained in:
Tim Graham 2019-02-04 20:22:44 -05:00
parent 9a750cbd5c
commit 3004d7057f
2 changed files with 3 additions and 9 deletions

View File

@ -4,15 +4,6 @@ import operator
from functools import total_ordering, wraps
# You can't trivially replace this with `functools.partial` because this binds
# to classes and returns bound instances, whereas functools.partial (on
# CPython) is a type and its instances don't bind.
def curry(_curried_func, *args, **kwargs):
def _curried(*moreargs, **morekwargs):
return _curried_func(*args, *moreargs, **{**kwargs, **morekwargs})
return _curried
class cached_property:
"""
Decorator that converts a method with a single self argument into a

View File

@ -271,6 +271,9 @@ Django 3.0, we're removing these APIs at this time.
* ``django.utils.encoding.python_2_unicode_compatible()`` - Alias of
``six.python_2_unicode_compatible()``.
* ``django.utils.functional.curry()`` - Use :func:`functools.partial` or
:class:`functools.partialmethod`. See :commit:`5b1c389603a353625ae1603`.
Miscellaneous
-------------