On Mon, Mar 24, 2008 at 11:11 PM, Brian Harring <[EMAIL PROTECTED]> wrote:
> On Mon, Mar 24, 2008 at 10:55:03PM -0500, Jeremy Dunck wrote:
>  > One other enhancement I thought might be good is to have a
>  > Model.pre_init signal
>
>  Such a signal exists already last I looked, same for post_init...
>  Please clarify.

...That's rather embarassing.  You're right; sorry for the muddle.

...
>  Please see ticket 4561... my attack of dispatch was to disable it when
>  nothing was listening, dynamically re-enabling it when there was a
>  listener.  Via that, there is *zero* overhead for disconnected signal
>  pathways-

I see what you're doing there, and I do appreciate the zero-overhead
on no connections.  I think the patch is a bit of a mind-bender, and
poking extra attributes onto existing functions is a bit scary.  I
guess I'll ask a committer to weigh in on it?

Original response from Jacob:
"
Looking over what Brian's written and the dispatch code, it looks like three
small changes would let us simplify dispatching immensely:

1. Require the ``sender`` argument when connecting to a signal (i.e. don't allow
``Any`` sender any more).

2. Don't do any pattern matching on call signals; assume all listeners conform
to the api ``listener(signal, sender, **kwargs)``.

3. Simplify ``robustApply`` accordingly (i.e. don't consider
positional arguments).

With those changes, the dynamic wrapping Brian's talking about would be much
easier and none of the signal code I've written or seen would break (IIRC).
"

So, Jacob or other committer: is the wrapping approach to
pre/post_init/save appreciated?  I'd be happy to clean up 4561 and
6814 into one patch if so.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to