#34998: Raising a StopIteration in asynchronous mode hangs the request
----------------------------------+--------------------------------------
     Reporter:  Clément Escolano  |                    Owner:  nobody
         Type:  Uncategorized     |                   Status:  new
    Component:  Uncategorized     |                  Version:  4.2
     Severity:  Normal            |               Resolution:
     Keywords:                    |             Triage Stage:  Unreviewed
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+--------------------------------------

Comment (by Andrew Godwin):

 Hmm yes, this is one of those nasty bugs that reveals the true nature of
 how Python async works.

 In testing this locally with just plain async functions, I don't see how
 we can catch this - the error happens when you return StopIteration from
 _any_ awaited function, you can't wrap around it to catch it instead.
 Given that views are always going to be async functions, unless we want to
 wrap every single view, decorator and middleware in our own custom Future
 it's not going to be reasonable to catch it.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34998#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 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/0107018c174c7d43-fc6f32f6-c109-4c27-a517-0f6a0705df2d-000000%40eu-central-1.amazonses.com.

Reply via email to