#12049: New LazyObject-wrapped User breaks queries in template tags
-------------------------------------+--------------------------------------
Reporter: chipx86 | Owner: nobody
Status: new | Milestone:
Component: Authentication | Version: SVN
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------+--------------------------------------
Comment (by chipx86):
The attached patch implements {{{__deepcopy__}}} for {{{LazyObject}}}. I
like the idea of providing the implementation there rather than in a
subclass as it seems that this functionality should exist higher up, but
if you think of a case where we really should limit this to a subclass, we
can change that.
I kept the testcase in the same place even though really the fix isn't
part of the auth framework. I couldn't find anything that, as far as I
could tell, tested LazyObject specifically, and since the User wrapper is
a real-world case of breakage (which could break again if User was wrapped
in something else), I thought it'd be nice to continue testing this case.
However, I'll leave this up to you to decide.
Ran the unit tests with Python 2.4, 2.5 and 2.6. All tests succeeded.
--
Ticket URL: <http://code.djangoproject.com/ticket/12049#comment:3>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---