On Tue, Sep 22, 2009 at 4:07 PM, Luke Plant <l.plant...@cantab.net> wrote: > Bummer, I tried hard not to break it - I added backwards > compatibility tests for the basic different uses. Could you produce > a test case?
So, I've worked out what the problem is. Previously either of these worked: cache_page(timeout, view) cache_page(view, timeout) Now, cache_page assumes that the first positional argument will be the timeout. So what we're seeing when running some of our code on trunk is cache_page treating the timeout value (an integer) as the view to be cached, and failing when trying to find things like __module__ attached to it. I don't know for certain how many people may be using this idiom, since it was never documented (AFAICT cache_page always documented itself as putting the timeout first and the view function second), so I'm not really sure what (if anything) we should do about it. There may also be deeper issues with the fact that it's not possible to call cache_page with explicit keyword args, since it accepts **kwargs but doesn't do anything with it, always assuming that the timeout and view can be pulled from positional args. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---