diff --git a/django/utils/functional.py b/django/utils/functional.py index 6118c108ef084..ab0be502ce074 100644 --- a/django/utils/functional.py +++ b/django/utils/functional.py @@ -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 diff --git a/docs/releases/3.0.txt b/docs/releases/3.0.txt index 4de12e3895b02..daf7352510648 100644 --- a/docs/releases/3.0.txt +++ b/docs/releases/3.0.txt @@ -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 -------------