#35083: Make django.utils.decorators.method_decorator work with async functions.
------------------------------+------------------------------------
Reporter: Drew Winstel | Owner: nobody
Type: New feature | Status: new
Component: Utilities | Version: 5.0
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
------------------------------+------------------------------------
Changes (by Natalia Bidart):
* cc: Carlton Gibson (added)
* type: Uncategorized => New feature
* component: Uncategorized => Utilities
* stage: Unreviewed => Accepted
Comment:
Hello Drew, thanks for your report!
From my understanding of the code, the decorators in
django.utils.decorators do not work with async functions (except for
`make_middleware_decorator`). I believe this ticket is similar to #31949,
#33882, and #35030. What's needed is to grow `method_decorator` so the
`decorator` param is tested for `iscoroutinefunction`.
Accepting on that premise as a new feature.
--
Ticket URL: <https://code.djangoproject.com/ticket/35083#comment:1>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/0107018cd0c0d567-fca979cc-3c9b-403e-9ccf-a4778afbce8c-000000%40eu-central-1.amazonses.com.