Changes between Initial Version and Version 1 of Ticket #32092
- Timestamp:
- Oct 8, 2020, 6:28:26 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #32092 – Description
initial v1 1 1 This ticket wishes to add an asynchronous DB backend, namely using [https://github.com/MagicStack/asyncpg asyncpg]. 2 3 I've recently finished porting [https://code.djangoproject.com/ticket/32076 Django's cache to use async methods] in an async context. I'm continuing along my opinion that we need to have the layer of the cake down, i.e. the cache and the db backends, before the rest of the async porting of Django can continue. Thus, I'd like to begin getting an async database backend as well using asyncpg for a future async Django ORM along with async template loading (since psycopg3 is not complete).4 2 5 3 I don't have much experience with the ORM itself, but I'd like to get the work started. One of the reasons this hasn't been started grandly is mentioned in DEP 9: … … 7 5 > A lot of this stems from the fact that the underlying database drivers are synchronous 8 6 9 [https://github.com/django/deps/blob/master/accepted/0009-async.rst#the-orm from here] and because Andrew, not me, is pretty busy lately. I think I can alleviate some of the workload by implementing this backend as a way to get started testing an async ORM. 7 One thing that must take place before this ticket starts any code is the design decision. Don't know how to cc people, but I'd like to know what the design decision would be? Unlike `cache.get_async`with that `_async` suffix, I feel like BaseDatabaseWrapper should just be duplicated into an AsyncBaseDatabaseWrapper? It wouldn't be DRY, so I'd love to know some thoughts!