#31949: ASGI - Cache Middleware and some view decorators broken
--------------------------------+--------------------------------------
Reporter: Michael Galler | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Description changed by Michael Galler:
Old description:
> The cache middleware is broken because it inherits from MiddlewareMixin
> and override the init method.
>
> {{{
> TypeError: object HttpResponse can't be used in 'await' expression
> }}}
>
> On both middlewares the self._async_check() is missing in init.
>
> Also the most view decorators are broken on async views, because the dont
> use async/await.
>
> For example:
>
> {{{
> cache_control
> xframe_options_deny
> vary_on_cookie
> }}}
New description:
The cache middleware is broken because it inherits from MiddlewareMixin
and override the init method.
{{{
TypeError: object HttpResponse can't be used in 'await' expression
}}}
On both middlewares the self._async_check() is missing in init.
Also the most view decorators are broken on async views, because the dont
provide async/await.
For example:
{{{
cache_control
xframe_options_deny
vary_on_cookie
}}}
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31949#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/065.bb4891be06667c1c0f2e4b592f43ae17%40djangoproject.com.