1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Refs #31327 -- Removed providing_args argument for Signal per deprecation timeline.

This commit is contained in:
Mariusz Felisiak
2021-01-13 11:08:32 +01:00
parent 4bb30fe5d5
commit 1adcf20385
3 changed files with 3 additions and 33 deletions

View File

@@ -1,9 +1,7 @@
import logging
import threading
import warnings
import weakref
from django.utils.deprecation import RemovedInDjango40Warning
from django.utils.inspect import func_accepts_kwargs
logger = logging.getLogger('django.dispatch')
@@ -30,19 +28,11 @@ class Signal:
receivers
{ receiverkey (id) : weakref(receiver) }
"""
def __init__(self, providing_args=None, use_caching=False):
def __init__(self, use_caching=False):
"""
Create a new signal.
"""
self.receivers = []
if providing_args is not None:
warnings.warn(
'The providing_args argument is deprecated. As it is purely '
'documentational, it has no replacement. If you rely on this '
'argument as documentation, you can move the text to a code '
'comment or docstring.',
RemovedInDjango40Warning, stacklevel=2,
)
self.lock = threading.Lock()
self.use_caching = use_caching
# For convenience we create empty caches even if they are not used.