diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2020-03-01 09:22:03 -0800 |
|---|---|---|
| committer | Carlton Gibson <carlton@noumenal.es> | 2020-03-05 09:38:52 +0100 |
| commit | 769cee525222bb155735aba31d6174d73c271f3c (patch) | |
| tree | eeaee53a694669e78a63c9da96da93db1ca0c9b8 /docs | |
| parent | 5ca76baa729bbbe62f5c4a0fc4f89747dc999029 (diff) | |
Fixed #31327 -- Deprecated providing_args argument for Signal.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/deprecation.txt | 3 | ||||
| -rw-r--r-- | docs/releases/3.1.txt | 5 | ||||
| -rw-r--r-- | docs/topics/signals.txt | 15 |
3 files changed, 12 insertions, 11 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 3774afa59e..a56730aef7 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -58,6 +58,9 @@ details on these changes. ``django.utils.deprecation.MiddlewareMixin.__init__()`` will be required and won't accept ``None``. +* The ``providing_args`` argument for ``django.dispatch.Signal`` will be + removed. + See the :ref:`Django 3.1 release notes <deprecated-features-3.1>` for more details on these changes. diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt index b1ae1134cb..88b355c9cf 100644 --- a/docs/releases/3.1.txt +++ b/docs/releases/3.1.txt @@ -546,6 +546,11 @@ Miscellaneous older versions of Django. Support for the old format remains until Django 4.0. +* The purely documentational ``providing_args`` argument for + :class:`~django.dispatch.Signal` is deprecated. If you rely on this + argument as documentation, you can move the text to a code comment or + docstring. + .. _removed-features-3.1: Features removed in 3.1 diff --git a/docs/topics/signals.txt b/docs/topics/signals.txt index ee097f9faa..30c8299fae 100644 --- a/docs/topics/signals.txt +++ b/docs/topics/signals.txt @@ -216,24 +216,17 @@ its own signals. Defining signals ---------------- -.. class:: Signal(providing_args=list) +.. class:: Signal() -All signals are :class:`django.dispatch.Signal` instances. The -``providing_args`` is a list of the names of arguments the signal will provide -to listeners. This is purely documentational, however, as there is nothing that -checks that the signal actually provides these arguments to its listeners. +All signals are :class:`django.dispatch.Signal` instances. For example:: import django.dispatch - pizza_done = django.dispatch.Signal(providing_args=["toppings", "size"]) + pizza_done = django.dispatch.Signal() -This declares a ``pizza_done`` signal that will provide receivers with -``toppings`` and ``size`` arguments. - -Remember that you're allowed to change this list of arguments at any time, so -getting the API right on the first try isn't necessary. +This declares a ``pizza_done`` signal. Sending signals --------------- |
