Current Async TODOs

I thought I’d keep a topic here that lists the current pieces of work needing to be done on the async views work, both for transparency and also if anyone wants to volunteer to help.

  • Merge async_views branch: In progress at https://github.com/django/django/pull/11650/

  • Make Signal async-aware: This will allow us to avoid forced sync_to_async calls in the async path for the request_started and request_finished signals

  • Make MiddlewareMixin async-aware: All default middleware uses this, and by making it do its own async dispatch, we can prevent it holding a synchronous thread open while a view is being called

  • Add an async runserver option: The current runserver command uses a WSGI server to work; we should provide an option to run it in ASGI mode (optional so we don’t force Daphne or uvicorn as dependencies of Django)

4 Likes