After some digging, it seems that at least StreamingHttpResponse itself
and ASGIHandler.send_response need changes to support that?
--
Ticket URL: <https://code.djangoproject.com/ticket/31852>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Andrew Godwin (added)
* status: new => closed
* resolution: => needsinfo
* type: Uncategorized => New feature
Comment:
Yes, this is probably something we should take as a new feature, but it's
a little undefined at the moment.
Can I point you to the Forum Async topic:
https://forum.djangoproject.com/c/internals/async/8https://forum.djangoproject.com/c/internals/async/8
That's a good place to discuss it, and get fleshed out what would be
required.
I'll cc Andrew, as maybe he already has thoughts.
--
Ticket URL: <https://code.djangoproject.com/ticket/31852#comment:1>
Comment (by Andrew Godwin):
We definitely should expand to add this, but async generators are quite
tough to support across a range of Python versions; they get increasingly
better to use every version. I think the best approach here would be an
exploratory patch to see what we can get that looks reasonable given
Django's current supported Python versions - 3.6 might be a high enough
baseline (3.5 is very problematic), but it might be a thing that's easier
in a future 3.7+ release.
--
Ticket URL: <https://code.djangoproject.com/ticket/31852#comment:2>
Comment (by Tim Graham):
#34300 requested this again, pointing to an implementation at
https://pypi.org/project/django-async-stream/.
--
Ticket URL: <https://code.djangoproject.com/ticket/31852#comment:3>
Comment (by Simon Charette):
Isn't this supported in 4.2 via (0bd2c0c9015b53c41394a1c0989afbfd94dc2830)
#33735?
--
Ticket URL: <https://code.djangoproject.com/ticket/31852#comment:4>