#18538: type(SimpleLazyObject) returns SimpleLazyObject rather than 
type(_wrapped)
-------------------------------------+-------------------------------------
     Reporter:  jdunck               |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  1.4
  (models, ORM)                      |               Resolution:  wontfix
     Severity:  Normal               |             Triage Stage:
     Keywords:                       |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by lukeplant):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 I also suspect there is nothing that can be done. Other approaches to
 making `request.user` lazy:

 1. Dynamically add something to the request class e.g. a user property.
 This causes problems with tests because you are mutating global state - we
 tried this before, and changed to `SimpleLazyObject` because of this
 problem.
 2. Using `lazy` - doesn't work because you don't know the type of user. It
 could be a third party class returned by a custom authentication backend.

 So I'm going to resolve as WONTFIX for now, but anyone with bright ideas
 for fixing this is welcome to re-open.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18538#comment:3>
Django <https://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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to