#32798: StreamingHttpResponse raises SynchronousOnlyOperation in ASGI server
--------------------------------+------------------------------------
     Reporter:  Ralph Broenink  |                    Owner:  nobody
         Type:  Bug             |                   Status:  new
    Component:  HTTP handling   |                  Version:  3.2
     Severity:  Normal          |               Resolution:
     Keywords:  ASGI, async     |             Triage Stage:  Accepted
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+------------------------------------
Changes (by Carlton Gibson):

 * cc: Andrew Godwin (added)
 * keywords:   => ASGI, async
 * stage:  Unreviewed => Accepted


Comment:

 Yes, this won't work. It's not the streaming response (the block this is
 raised from explicitly handles that) but rather the ORM call.

 > This is not expected behaviour, and appears not to be documented.

 I think (currently) it is the expected behaviour. It's covered in the
 [https://docs.djangoproject.com/en/3.2/topics/async/#async-safety Async
 safety] section of the Asynchronous support docs.

 Hmmm 🤔 but yes, it's a limitation on the async wrapping of synchronous
 views… I'll accept for now because I can't quite see a better place to pin
 it. It's likely this will not be resolved until we have a better async
 story for the ORM, but that's not yet at the ticketed stage. (If we had
 such a ticket open, I'd say it's a duplicate of that.)

 I'll cc Andrew so it crosses his radar as a target use-case.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32798#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 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.eeca9ca833d790499cf3818a827f8110%40djangoproject.com.

Reply via email to