Skip to content

Commit

Permalink
Refs #31327 -- Removed providing_args argument for Signal per depreca…
Browse files Browse the repository at this point in the history
…tion timeline.
  • Loading branch information
felixxm committed Jan 14, 2021
1 parent 4bb30fe commit 1adcf20
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 33 deletions.
12 changes: 1 addition & 11 deletions django/dispatch/dispatcher.py
Original file line number Diff line number Diff line change
@@ -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')
Expand All @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions docs/releases/4.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,3 +299,5 @@ to remove usage of these features.
* The ``get_request`` argument for
``django.utils.deprecation.MiddlewareMixin.__init__()`` is required and
doesn't accept ``None``.

* The ``providing_args`` argument for ``django.dispatch.Signal`` is removed.
22 changes: 0 additions & 22 deletions tests/signals/test_deprecation.py

This file was deleted.

0 comments on commit 1adcf20

Please sign in to comment.