Opened 8 years ago

Closed 7 years ago

Last modified 5 years ago

#9243 closed (fixed)

Document Signal.connect weak parameter

Reported by: ekellner Owned by: kkubasik
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:


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

doc patch

comment:1 Changed 7 years ago by jacob

  • milestone set to 1.1
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 7 years ago by kkubasik

  • Keywords kkmegapatch added
  • Owner changed from nobody to kkubasik

comment:3 Changed 7 years ago by jacob

  • Resolution set to fixed
  • Status changed from new to closed

(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 deleted

Milestone 1.1 deleted

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