Document Signal.connect weak parameter
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.
Change History
(5)
milestone: |
→ 1.1
|
Triage Stage: |
Unreviewed → Accepted
|
Keywords: |
kkmegapatch added
|
Owner: |
changed from nobody to Kevin Kubasik
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
doc patch