#34477: Asyncio send mail backend
-------------------------------------+-------------------------------------
     Reporter:  Andrew Chen Wang     |                    Owner:  Ahmed
                                     |  Ibrahim
         Type:  New feature          |                   Status:  assigned
    Component:  Core (Mail)          |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Mike Edmunds):

 Replying to [comment:6 Ahmed Ibrahim]:
 > Would it be better if I leave the sync implementations as is, and add a
 new async implementation, because I my mind tells that we can create the
 async and use the async to create a new sync handler with `sync_to_async`
 so that the logic is only in one place

 My instinct is that each EmailBackend should decide for itself whether to
 implement `send_messages()`, `asend_messages()`, or both. And then
 ''maybe'' the BaseEmailBackend implementation could `sync_to_async` or
 `async_to_sync` if a subclass only provides one of them. (But I'd need to
 think some more about what happens if an existing sync send method gets
 asyncified.)
-- 
Ticket URL: <https://code.djangoproject.com/ticket/34477#comment:8>
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/010701983dbb5697-4981ac11-5041-462e-9df3-502ca382e766-000000%40eu-central-1.amazonses.com.

Reply via email to