-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asyncio support? #306
Comments
I hadn't really thought about asyncio yet, but it certainly makes sense for calling ESP APIs. I'd prefer to see async email land in Django core first, before adding it to Anymail, so that the new backend APIs are finalized and we could test against them. I suspect it would also help to get some real-world experience with an async version of Django's default SMTP EmailBackend. (Is there a reason your PR doesn't include the SMTP backend?) A few additional things we'd need to figure out for Anymail:
Btw, Anymail support for SES v1 is deprecated and shouldn't really get any new features before we remove it later this year. (SES v2 is nearly identical to SES v1, just rearranges API names and params.) |
Two reasons: From previous experience, Django team usually asks that I add a base implementation to get the design right. The other reason is that locally, most of the time, I usually use a console backend rather than MailHog, so I never got around to it.
Either work as I've seen almost all project grows to a point where both are installed. HTTPX makes more sense if we want to reuse classes and logic flow.
Suggestion of HTTPX probably will deprecate usage of requests.
I don't it's possible to just add a single async option unfortunately :( I do think forcing
Yes. Async ORM is already here, so I think it's time!
Vendored it back in February, right before v2 was released 😅 |
So, I'm rethinking my earlier "I'd prefer to see async email land in Django core first." I actually think it would be fine for Anymail to introduce async email support ahead of Django. (And that might even provide some additional validation for your Django proposal.) We'd probably want a big disclaimer that Anymail's async support should be considered experimental, and could change suddenly to match wherever Django ends up. And a nice bonus is this would also backport the (proposed) Django 5.0 async |
This is great to hear! Definitely not going to be releasing a different package. I like the idea that anymail can be a backport of async versions of backends! Unfortunately you've caught me right when I bricked my computer and don't have much time to contribute (hence lack of progress in the Django core PR). Happy to share my code to add to the repo! Will make a gist maybe? |
Any plans for asyncio support? I made a vendored version of the base console, and making PR to Django. Tracking: django/django#16744
I've made an SES v1 asyncio version. Happy to add unless you'd like to see the async one be merged first.
The text was updated successfully, but these errors were encountered: