1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Refs #24205 -- Removed Signal.disconnect()'s weak argument.

Per deprecation timeline.
This commit is contained in:
Tim Graham
2016-11-07 14:46:42 +00:00
parent e8dac72a55
commit 03087f80d1
5 changed files with 5 additions and 39 deletions

View File

@@ -1,10 +1,8 @@
import warnings
from functools import partial
from django.db.models.utils import make_model_tuple
from django.dispatch import Signal
from django.utils import six
from django.utils.deprecation import RemovedInDjango20Warning
class_prepared = Signal(providing_args=["class"])
@@ -32,9 +30,7 @@ class ModelSignal(Signal):
weak=weak, dispatch_uid=dispatch_uid,
)
def disconnect(self, receiver=None, sender=None, weak=None, dispatch_uid=None, apps=None):
if weak is not None:
warnings.warn("Passing `weak` to disconnect has no effect.", RemovedInDjango20Warning, stacklevel=2)
def disconnect(self, receiver=None, sender=None, dispatch_uid=None, apps=None):
return self._lazy_method(
super(ModelSignal, self).disconnect, apps, receiver, sender, dispatch_uid=dispatch_uid
)