#33331: Improve exception handling with `cursor.close()` after errors
-------------------------------------+-------------------------------------
     Reporter:  Daniel Hahler        |                    Owner:  nobody
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  3.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  needsinfo
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson):

 > The main thing … is not raising errors from cursor.close() in the first
 place … e.g. when it gets used for display in the short test summary etc.

 So the request is suppressing the chained nested exception — you don't
 want the newer Python 3 behaviour in this case — which would be a new
 feature, rather than a fixing a regression from #16614.

 And the reason you want this if because your test runner (presumably
 pytest) formats its output in a given way? (Is that it?)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33331#comment:9>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.e1408392b3c6fc0427b26d973159b7e9%40djangoproject.com.

Reply via email to