Skip to content

Commit

Permalink
Refs #27753 -- Removed django.utils.functional.curry().
Browse files Browse the repository at this point in the history
  • Loading branch information
timgraham committed Feb 5, 2019
1 parent 0dcff14 commit eed4387
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
9 changes: 0 additions & 9 deletions django/utils/functional.py
Expand Up @@ -4,15 +4,6 @@
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
Expand Down
3 changes: 3 additions & 0 deletions docs/releases/3.0.txt
Expand Up @@ -272,6 +272,9 @@ Django 3.0, we're removing these APIs at this time.
``six.python_2_unicode_compatible()`` if you still need Python 2
compatibility.

* ``django.utils.functional.curry()`` - Use :func:`functools.partial` or
:class:`functools.partialmethod`. See :commit:`5b1c389603a353625ae1603`.

Miscellaneous
-------------

Expand Down

0 comments on commit eed4387

Please sign in to comment.