Opened 8 years ago

Closed 8 years ago

#4521 closed (wontfix)

signals should have __(str|repr)__ for debugging/maintenance.

Reported by: (removed) Owned by: adrian
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

django.dispatch.dispatcher.An(y|onymous) singletons derive from a 'Parameter' class, basically providing a default repr, docstring. Useful for those signals, but should be generalized so that it's usable for other custom signals for any poor folks trying to yet again optimize dispatch :)

Attached is a patch adding a custom _signal class; it's not required for creation of a specific signal to connect to, merely advisable- adds in str/repr automatically (and docstring if supplied) making things a bit simpler for folks debugging.

Attachments (1)

signal-class.patch (2.8 KB) - added by (removed) 8 years ago.
add django.dispatch.signal func to return a singleton with docstring/label bound in, and usable (str|repr)

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by (removed)

add django.dispatch.signal func to return a singleton with docstring/label bound in, and usable (str|repr)

comment:1 Changed 8 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 8 years ago by mtredinnick

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

We're going to end up taking some variation on #4561 and that includes this functionality. So let's punt this exact patch and push the other one to completion.

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