#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 Daniel Hahler):

 https://code.djangoproject.com/ticket/16614#comment:31 is about "Refs
 #16614 -- Prevented database errors from being masked by cursor close.".

 The fix there ignored all exceptions
 
(https://github.com/django/django/commit/6b6be692fcd102436c7abef1d7b3fa1d37ad4bdf).
 The fix I've done for the regression is a bit smarter to still raise in
 case of unexpected errors.
 (This could also be removed in case you want a more concise patch, but
 even when it is unlikely that it would swallow something unwanted, I've
 meant to put attention to detail there - just in line with the difference
 that we've previously discussed here)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33331#comment:10>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.110f13a2335a47b2a40e35cc067ee566%40djangoproject.com.

Reply via email to