Description
As discussed on the Django forumns Carlton pointed out that one area we'd like to invest in in is Channels support for the new async functionality that has been added over the last several releases (refer to the above thread for details).
I've scanned the channels repo by searching for database_sync_to_async
and observed a few areas that could benefit from these new APIs:
- Sessions
- Auth
(this list is the same as Carlton pointed out on that thread, something tells me he might be some kind of expert!)
The other calls to database_sync_to_async
are from wrappers for intentionally sync code, or tests (neither of which are pertinent).
I'd like to propose using these native APIs. The one hitch I see is that these features are too new to be used presently:
- async sessions has not yet been released (scheduled for 5.1)
- async auth was released in 5.0
Considering that Channels currently supports 4.2 (and definitely doesn't yet support unreleased 5.1) we might have to do some feature-checking or wait until Channels bumps its minimum supported version. Should I start now with writing some polyfills/feature-checks or set this aside until minimum versions are bumped?