[Django] #31327: Deprecate providing_args argument from Signal

96 views
Skip to first unread message

Django

unread,
Mar 1, 2020, 12:33:41 PM3/1/20
to django-...@googlegroups.com
#31327: Deprecate providing_args argument from Signal
------------------------------------------------+------------------------
Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
The argument is and always has been purely documentational. It provides no
functionality or checking. Therefore, these values are stored in memory
for no real use.

Documentation can be handled just as easily by a code comment or real
documentation articles.

On a more practical level, I rarely signals, so I recently had to look up
their interface. Seeing this `providing_args` argument required me to
think about how to best use it, only to realize it actually goes unused.
We can remove this cognitive distraction from the docs.

It has caused other small confusion in the past: #19579.

--
Ticket URL: <https://code.djangoproject.com/ticket/31327>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 1, 2020, 12:36:03 PM3/1/20
to django-...@googlegroups.com
#31327: Deprecate providing_args argument from Signal
-------------------------------------+-------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Utilities | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jon Dufresne):

* has_patch: 0 => 1


Comment:

https://github.com/django/django/pull/12513

--
Ticket URL: <https://code.djangoproject.com/ticket/31327#comment:1>

Django

unread,
Mar 3, 2020, 3:39:14 AM3/3/20
to django-...@googlegroups.com
#31327: Deprecate providing_args argument from Signal
--------------------------------------+------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Carlton Gibson):

* stage: Unreviewed => Accepted


Comment:

> On a more practical level, I rarely signals, so I recently had to look
up their interface. Seeing this providing_args argument required me to
think about how to best use it, only to realize it actually goes unused.
We can remove this cognitive distraction from the docs.

Amen to this sentiment. We put every single user through the exact same
mental cycle, for, I agree, very little.

[https://groups.google.com/d/msg/django-
developers/gV92rX6CPL8/gxj2fwpbbHoJ Comment from 2008 on the mailing
list]:

> We went back and forth trying to balance features and performance and
decided to remove the functionality still referenced in the docstring. At
the moment, the providing_args parameter is purely for documentation
purposes, but extra checking may be added in the future if necessary.

I think 12 years later we can accept that this extra never will be added,
and simplify the API.

The signals docs list the parameters.
[https://docs.djangoproject.com/en/3.0/ref/signals/#pre-init For example,
`pre_init`]. I've never thought to look to the source for that. I can't
believe many other folks have either.

--
Ticket URL: <https://code.djangoproject.com/ticket/31327#comment:2>

Django

unread,
Mar 4, 2020, 9:57:35 AM3/4/20
to django-...@googlegroups.com
#31327: Deprecate providing_args argument from Signal
-------------------------------------+-------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Utilities | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/31327#comment:3>

Django

unread,
Mar 5, 2020, 3:39:05 AM3/5/20
to django-...@googlegroups.com
#31327: Deprecate providing_args argument from Signal
-------------------------------------+-------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Utilities | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson <carlton@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"769cee525222bb155735aba31d6174d73c271f3c" 769cee5]:
{{{
#!CommitTicketReference repository=""
revision="769cee525222bb155735aba31d6174d73c271f3c"
Fixed #31327 -- Deprecated providing_args argument for Signal.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31327#comment:4>

Django

unread,
Jan 14, 2021, 2:12:19 PM1/14/21
to django-...@googlegroups.com
#31327: Deprecate providing_args argument from Signal
-------------------------------------+-------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Utilities | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"1adcf20385c2856d3655089ff7a0b55b32e5587a" 1adcf203]:
{{{
#!CommitTicketReference repository=""
revision="1adcf20385c2856d3655089ff7a0b55b32e5587a"
Refs #31327 -- Removed providing_args argument for Signal per deprecation
timeline.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31327#comment:5>

Reply all
Reply to author
Forward
0 new messages