Yeah I am up for pointing this at a smaller subsystem. The DB backend in particular for sessions is already doing the duplication so we could just point it at the existing system with very little code changes (probably).
The trickier stuff is when the existing async implementations call into sync implementations.
# in django/contrib/sessions/backend/files.py
async def aload(self):
return self.load()
The existing code calls into the sync implementation, so existing subclasses of the file-based SessionStore
that override just load
also have a version of aload
that behaves properly. If aload
is ported over to use codegen then there’s breakage there, unless some other stuff happens.
Just
I had opened up another topic regarding this issue in the past… there’s definitely some trickery we can do to avoid issues on this front, but maybe this is a thing where backwards compatibility breaks would just be the most reasonable.