#33882: Allow transaction.atomic to work in async contexts.
-------------------------------------+-------------------------------------
     Reporter:  alex                 |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  4.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  async                |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Heraldo Lucena):

 I opened an issue at the channels repo
 https://github.com/django/channels/issues/1937 related to this.

 The use case is not rare, it's pretty common on an async codebase. As you
 know, async code requires new API definitions on new namespaces, sync
 (blocking) and async code can't be mixed. Actually Django forces you to
 run the full transaction block inside @sync_to_async decorated functions,
 the async API becomes useless, you can't reuse any async code.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33882#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184eea25105-1cdb96f7-5ea5-46ae-891f-4604013f670d-000000%40eu-central-1.amazonses.com.

Reply via email to