#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: wontfix Keywords: | Triage Stage: | Unreviewed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Carlton Gibson):
* status: new => closed * resolution: => wontfix Comment: There was an extended discussion of the merits of the `raise...from` syntax around #31177 ([https://groups.google.com/g/django- developers/c/ibEOt3A9c2M/m/sOL7YV5LFwAJ Mailing list thread]). The summary of that was that, in general, given that exceptions are automatically chained, the different message **between** the chained exceptions was not worth the noise. The cited exceptions were using `raise...from` to remove noise from an long-chain of exceptions, when you wished to pull-out the **real cause** that may perhaps lie a frame frames deep, and using `from None` to suppress chaining, when the underlying exception is not informative. I'm going to close as wontfix on the basis of that discussion. If you think this case is different you can message the DevelopersMailingList. (If so, please give a concrete example of how the change is supposed to help β I couldn't really see if from the description here β it seems like a lot of effort to change the message between the tracebacks, but maybe you're using the `__cause__` attribute in a way that merits itβ¦? π€) -- Ticket URL: <https://code.djangoproject.com/ticket/33331#comment:2> 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.783d21bcfa6b3dfb30389002ffd154d5%40djangoproject.com.