Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#9243 closed (fixed)

Document Signal.connect weak parameter

Reported by: ekellner Owned by: Kevin Kubasik
Component: Documentation Version: 1.0
Severity: Keywords: signals kkmegapatch
Cc: ekellner@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Django signals keep a weak reference to the signal handler. If you handler is a local function, it will be garbage collected. There is a name parameter in Signal.connect, so you can put weak=False to stop this, but this functionality appears to be undocumented.

It would be nice if this was mentioned somewhere in the signals documentation, since when your signal handler is garbage collected, it is silently not called and it's not trivial to figure out what's going on.

Attachments (1)

signals.txt (600 bytes) - added by ekellner 8 years ago.
doc patch

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by ekellner

Attachment: signals.txt added

doc patch

comment:1 Changed 8 years ago by Jacob

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:2 Changed 8 years ago by Kevin Kubasik

Keywords: kkmegapatch added
Owner: changed from nobody to Kevin Kubasik

comment:3 Changed 8 years ago by Jacob

Resolution: fixed
Status: newclosed

(In [10303]) A whole lotta documentation fixes: Fixes #8704, #8826, #8980, #9243, #9343, #9529,

comment:12 Changed 5 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top