#16245: send_robust should include traceback in response when Exception occurs -------------------------------------+------------------------------------- Reporter: jsdalton | Owner: nobody Type: | Status: new Cleanup/optimization | Component: Core (Other) Milestone: 1.4 | Severity: Normal Version: SVN | Keywords: signals Resolution: | Has patch: 1 Triage Stage: | Needs tests: 0 Unreviewed | Easy pickings: 0 Needs documentation: 0 | Patch needs improvement: 0 | UI/UX: 0 | -------------------------------------+------------------------------------- Changes (by jsdalton):
* cc: jsdalton (added) * needs_docs: => 0 * has_patch: 0 => 1 * needs_tests: => 0 * needs_better_patch: => 0 Comment: Patch for this ticket attached. The most significant aspect of this patch is the change in the documentation. I had to reword the signals documentation a bit to make clear that a three tuple with the traceback is appended to the list returned by `send_robust()` instead of the usual `(receiver, response)` tuple pair. I spent a bit of time considering whether adding the traceback to the tuple was the cleanest approach. It muddies the API a bit, since previously a tuple pair was always appended no matter what. It has the advantage of not breaking any existing code since the first two items in the tuple are exactly the same as they were before the change. In researching this patch I also learned that all this is unnecessary in Python 3.0. Per PEP 3134 (http://www.python.org/dev/peps/pep-3134/), Exception objects in Python 3.0 have a __traceback__ attribute which hold the traceback object for the call stack at the point where the exception occurred. -- Ticket URL: <https://code.djangoproject.com/ticket/16245#comment:1> 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.