Django

Code

Show
Ignore:
Timestamp:
08/06/08 10:32:46 (5 months ago)
Author:
jacob
Message:

Major refactoring of django.dispatch with an eye towards speed. The net result is that signals are up to 90% faster.

Though some attempts and backwards-compatibility were made, speed trumped compatibility. Thus, as usual, check BackwardsIncompatibleChanges for the complete list of backwards-incompatible changes.

Thanks to Jeremy Dunck and Keith Busell for the bulk of the work; some ideas from Brian Herring's previous work (refs #4561) were incorporated.

Documentation is, sigh, still forthcoming.

Fixes #6814 and #3951 (with the new dispatch_uid argument to connect).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/handlers/base.py

    r8015 r8223  
    33from django import http 
    44from django.core import signals 
    5 from django.dispatch import dispatcher 
    65from django.utils.encoding import force_unicode 
    76 
     
    123122            # Get the exception info now, in case another exception is thrown later. 
    124123            exc_info = sys.exc_info() 
    125             receivers = dispatcher.send(signal=signals.got_request_exception, request=request) 
     124            receivers = signals.got_request_exception.send(sender=self.__class__, request=request) 
    126125            return self.handle_uncaught_exception(request, resolver, exc_info) 
    127126