summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2019-02-04 19:44:54 -0500
committerTim Graham <timograham@gmail.com>2019-02-05 12:52:07 -0500
commitd1f4b3c68aec092051392b64e993db3ce0e5acbf (patch)
treec7b1a35dd33a4d1c93d9882a488f1db4bb61c2f2
parentc679f357a8127d7776b60679071a7b791d39a5b3 (diff)
Refs #27753 -- Removed django.utils.decorators.available_attrs().
-rw-r--r--django/utils/decorators.py12
-rw-r--r--docs/releases/3.0.txt3
2 files changed, 4 insertions, 11 deletions
diff --git a/django/utils/decorators.py b/django/utils/decorators.py
index f5f3be2f16..f0998b8bd1 100644
--- a/django/utils/decorators.py
+++ b/django/utils/decorators.py
@@ -2,7 +2,7 @@
# For backwards compatibility in Django 2.0.
from contextlib import ContextDecorator # noqa
-from functools import WRAPPER_ASSIGNMENTS, partial, update_wrapper, wraps
+from functools import partial, update_wrapper, wraps
class classonlymethod(classmethod):
@@ -113,16 +113,6 @@ def decorator_from_middleware(middleware_class):
return make_middleware_decorator(middleware_class)()
-# Unused, for backwards compatibility in Django 2.0.
-def available_attrs(fn):
- """
- Return the list of functools-wrappable attributes on a callable.
- This was required as a workaround for https://bugs.python.org/issue3445
- under Python 2.
- """
- return WRAPPER_ASSIGNMENTS
-
-
def make_middleware_decorator(middleware_class):
def _make_decorator(*m_args, **m_kwargs):
middleware = middleware_class(*m_args, **m_kwargs)
diff --git a/docs/releases/3.0.txt b/docs/releases/3.0.txt
index 14fa129bf2..7801db12f2 100644
--- a/docs/releases/3.0.txt
+++ b/docs/releases/3.0.txt
@@ -254,6 +254,9 @@ Django 3.0, we're removing these APIs at this time.
* ``django.utils.lru_cache.lru_cache()`` - Alias of
:func:`functools.lru_cache`.
+* ``django.utils.decorators.available_attrs()`` - This function returns
+ ``functools.WRAPPER_ASSIGNMENTS``.
+
Miscellaneous
-------------