On Wednesday 14 October 2009 15:32:11 Jacob Kaplan-Moss wrote: > On Wed, Oct 14, 2009 at 7:24 AM, Luke Plant <[email protected]> wrote: > > I want to fix #6552 (also #12031), and I've attached a patch that > > makes the auth context processor lazy. > > The patch looks good to me. The approach is a bit hard to follow > what with the multiple types of lazyness involved, but it makes > enough sense to me. I'm fine with this going in.
Did you see the second patch or the first? It now uses 'lazy' for PermWrapper, 'lazy + memoize' for messages (because User.get_and_delete_messages() is not idempotent), and ContextLazyObject for the User object. Still a bit of a mess, but it's the best I can come up with so far. For the moment, I think I'm going to keep ContextLazyObject private (I'll move it), because there are probably too many limitations and gotchas. If it gets used again internally and turns out to be useful/robust enough for public use, fine. Luke -- "You'll be glad to know, I'm going to donate all the snot I sneeze to hospitals for mucus transfusions." (Calvin and Hobbes) Luke Plant || http://lukeplant.me.uk/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
