Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#31224 closed New feature (fixed)

Add asynchronous views.

Reported by: Mariusz Felisiak Owned by: Andrew Godwin
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Evstifeev Roman Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Add asynchronous views in Django (see details).

Accepted based on DEP 0009: Async-capable Django.

PR

Change History (15)

comment:1 by Carlton Gibson, 4 years ago

Needs tests: set

comment:2 by Carlton Gibson, 4 years ago

Needs tests: unset

comment:3 by Evstifeev Roman, 4 years ago

Cc: Evstifeev Roman added

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In 1e858adf:

Refs #31224 -- Added BaseHandler.check_response().

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In 17009e9:

Refs #31224 -- Added autoconversion of test async methods.

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In 40a64dd1:

Refs #31224 -- Doc'd async adapter functions.

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In 8d4638db:

[3.0.x] Refs #31224 -- Doc'd async adapter functions.

Backport of 40a64dd1e24d45f8e00a55b22a5174b8f1359b5c from master

comment:8 by Carlton Gibson, 4 years ago

Triage Stage: AcceptedReady for checkin

comment:9 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In fc0fa72f:

Fixed #31224 -- Added support for asynchronous views and middleware.

This implements support for asynchronous views, asynchronous tests,
asynchronous middleware, and an asynchronous test client.

comment:10 by GitHub <noreply@…>, 4 years ago

In b5ad450f:

Refs #31224 -- Removed incorrect @sync_to_async(thread_sensitive=True) example.

It does not support thread_sensitive when used as a decorator, yet.

comment:11 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In d292d11:

[3.0.x] Refs #31224 -- Removed incorrect @sync_to_async(thread_sensitive=True) example.

It does not support thread_sensitive when used as a decorator, yet.
Backport of b5ad450fa6d53186b68f89a4507fdbabc8900f74 from master

comment:12 by GitHub <noreply@…>, 4 years ago

In d94a9aa:

Refs #31040, Refs #31224 -- Prevented cycles in exceptions chain.

Async exception handling was raising an exception that was creating a
cycle in the exception chain (by re-raising an exception in
sync_to_async that was already being handled).

Thanks Chris Jerdonek for detailed analysis.

comment:13 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In bd389a8:

[3.1.x] Refs #31040, Refs #31224 -- Prevented cycles in exceptions chain.

Async exception handling was raising an exception that was creating a
cycle in the exception chain (by re-raising an exception in
sync_to_async that was already being handled).

Thanks Chris Jerdonek for detailed analysis.
Backport of d94a9aa0557a459a5b9b7b82a8c043de14f8b1a0 from master

comment:14 by Carlton Gibson <carlton@…>, 4 years ago

In 8d59075:

Refs #31224 -- Made sync_to_async() examples use thread sensitive with ORM calls.

comment:15 by Carlton Gibson <carlton.gibson@…>, 4 years ago

In f36c441f:

[3.1.x] Refs #31224 -- Made sync_to_async() examples use thread sensitive with ORM calls.

Backport of 8d59075184f4cd2852b374359850ff7aeb412ec1 from master

Note: See TracTickets for help on using tickets.
Back to Top