Django

Code

Ticket #4521 (closed: wontfix)

Opened 1 year ago

Last modified 1 year ago

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

Reported by: Brian Harring <ferringb@gmail.com> Assigned to: adrian
Milestone: Component: Core framework
Version: SVN Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

signal-class.patch (2.8 kB) - added by Brian Harring <ferringb@gmail.com> on 06/10/07 07:52:40.
add django.dispatch.signal func to return a singleton with docstring/label bound in, and usable (str|repr)

Change History

06/10/07 07:52:40 changed by Brian Harring <ferringb@gmail.com>

  • attachment signal-class.patch added.

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

06/11/07 07:04:42 changed by mtredinnick

  • needs_better_patch changed.
  • stage changed from Unreviewed to Ready for checkin.
  • needs_tests changed.
  • needs_docs changed.

06/14/07 19:05:36 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to wontfix.

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.


Add/Change #4521 (signals should have __(str|repr)__ for debugging/maintenance.)




Change Properties
Action