Opened 16 years ago

Closed 15 years ago

Last modified 13 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: no UI/UX: no

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 16 years ago.
doc patch

Download all attachments as: .zip

Change History (5)

by ekellner, 16 years ago

Attachment: signals.txt added

doc patch

comment:1 by Jacob, 15 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:2 by Kevin Kubasik, 15 years ago

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

comment:3 by Jacob, 15 years ago

Resolution: fixed
Status: newclosed

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

comment:12 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

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