Refs #27753 -- Removed django.utils.decorators.available_attrs().
This commit is contained in:
parent
c679f357a8
commit
d1f4b3c68a
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# For backwards compatibility in Django 2.0.
|
# For backwards compatibility in Django 2.0.
|
||||||
from contextlib import ContextDecorator # noqa
|
from contextlib import ContextDecorator # noqa
|
||||||
from functools import WRAPPER_ASSIGNMENTS, partial, update_wrapper, wraps
|
from functools import partial, update_wrapper, wraps
|
||||||
|
|
||||||
|
|
||||||
class classonlymethod(classmethod):
|
class classonlymethod(classmethod):
|
||||||
|
@ -113,16 +113,6 @@ def decorator_from_middleware(middleware_class):
|
||||||
return make_middleware_decorator(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_middleware_decorator(middleware_class):
|
||||||
def _make_decorator(*m_args, **m_kwargs):
|
def _make_decorator(*m_args, **m_kwargs):
|
||||||
middleware = middleware_class(*m_args, **m_kwargs)
|
middleware = middleware_class(*m_args, **m_kwargs)
|
||||||
|
|
|
@ -254,6 +254,9 @@ Django 3.0, we're removing these APIs at this time.
|
||||||
* ``django.utils.lru_cache.lru_cache()`` - Alias of
|
* ``django.utils.lru_cache.lru_cache()`` - Alias of
|
||||||
:func:`functools.lru_cache`.
|
:func:`functools.lru_cache`.
|
||||||
|
|
||||||
|
* ``django.utils.decorators.available_attrs()`` - This function returns
|
||||||
|
``functools.WRAPPER_ASSIGNMENTS``.
|
||||||
|
|
||||||
Miscellaneous
|
Miscellaneous
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue