#16374: ExceptionReporter may re-evaluate error-causing queryset, leading to a
later DatabaseError that masks the original one
-------------------------------------+-------------------------------------
               Reporter:  aaron      |          Owner:  nobody
                   Type:  Bug        |         Status:  new
              Milestone:             |      Component:  Core (Other)
                Version:  1.3        |       Severity:  Normal
             Resolution:             |       Keywords:  ExceptionReporter
           Triage Stage:  Accepted   |  DatabaseError current transaction
    Needs documentation:  0          |  aborted error queryset
Patch needs improvement:  0          |      Has patch:  0
                  UI/UX:  0          |    Needs tests:  0
                                     |  Easy pickings:  0
-------------------------------------+-------------------------------------
Changes (by lukeplant):

 * component:  Generic views => Core (Other)


Comment:

 Regarding a hook in ``manage.py shell`` - that wouldn't be acceptable,
 because it is far from the only way that Django code is run from an
 interactive Python session.

 Here are some other options for stopping this happening:

  * For your second idea, instead of a global toggle, we could simply
 monkey patch `QuerySet.__repr__` when rendering the error page.
  * We could just do isinstance checks for `QuerySet`.
  * `QuerySet.__repr__` is potentially just one source of DB activity, so a
 fuller solution might be to turn the DB code into 'don't do anything'
 mode. This could be via some global, or by some monkey patching.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16374#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 [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.

Reply via email to