Hi Jon,

Thank you for your input. 

Le samedi 5 août 2023 à 19:43:57 UTC+2, Jon Janzen a écrit :

There are a few key things missing from core django before that's possible. 
Some of which are laid out in that forum thread I linked above, others are 
listed directly in the DEP like the ORM being fully asyncified (right now 
it's just an async wrapper around sync code) which is somewhat blocked on 
async database implementations (psycopg3 being the first one supported).


>From my understanding, async ORM calls are wrapped with sync_to_async, and 
this status-quo will remain for synchronous database libraries, such as 
psycopg2.

I also understand that the heavy lifting in async_to_sync and sync_to_async 
wrapper has been implemented 
<https://docs.djangoproject.com/en/4.2/topics/async/#async-to-sync> and the 
hard work like thread affinity is managed by these wrapper.

If I try to improve my own work on #34717, a simple change as this one 
<https://github.com/olibook/django/commit/844590eeec60126674fe6c4e348db343a3ec5646>
 passes 
all the tests on sqlite and postgres. Any idea of what could break with 
this kind of changes ?

Cheers

- Olivier

 



-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/3e860290-7cf3-461d-b595-250c167e53f3n%40googlegroups.com.
  • Syn... Olivier Tabone
    • ... Jon Janzen
      • ... Lufafa Joshua
        • ... Olivier Tabone
      • ... Olivier Tabone
        • ... Mariusz Felisiak
          • ... 'Adam Johnson' via Django developers (Contributions to Django itself)

Reply via email to