[Django] #31224: Add asynchronous views.

39 views
Skip to first unread message

Django

unread,
Feb 3, 2020, 3:16:33 AM2/3/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
----------------------------------------+-------------------------------
Reporter: felixxm | Owner: Andrew Godwin
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
----------------------------------------+-------------------------------
Add asynchronous views in Django (see
[https://github.com/django/deps/blob/master/accepted/0009-async.rst#views-
http-handling details]).

Accepted based on
[https://github.com/django/deps/blob/master/accepted/0009-async.rst DEP
0009: Async-capable Django].

[https://github.com/django/django/pull/11650 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/31224>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 5, 2020, 10:25:48 AM2/5/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
------------------------------+-----------------------------------------

Reporter: felixxm | Owner: Andrew Godwin
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------
Changes (by Carlton Gibson):

* needs_tests: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:1>

Django

unread,
Feb 5, 2020, 2:59:03 PM2/5/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
------------------------------+-----------------------------------------
Reporter: felixxm | Owner: Andrew Godwin
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------
Changes (by Carlton Gibson):

* needs_tests: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:2>

Django

unread,
Feb 7, 2020, 6:38:32 AM2/7/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
------------------------------+-----------------------------------------
Reporter: felixxm | Owner: Andrew Godwin
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------
Changes (by Evstifeev Roman):

* cc: Evstifeev Roman (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:3>

Django

unread,
Feb 19, 2020, 8:16:45 AM2/19/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
------------------------------+-----------------------------------------
Reporter: felixxm | Owner: Andrew Godwin
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"1e858adf7fabdeb98f95503d30ed6769a08c44b2" 1e858adf]:
{{{
#!CommitTicketReference repository=""
revision="1e858adf7fabdeb98f95503d30ed6769a08c44b2"
Refs #31224 -- Added BaseHandler.check_response().
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:4>

Django

unread,
Mar 5, 2020, 9:09:58 AM3/5/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
------------------------------+-----------------------------------------
Reporter: felixxm | Owner: Andrew Godwin
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"17009e910538b9c3709d302f54c2d10eb245cf38" 17009e9]:
{{{
#!CommitTicketReference repository=""
revision="17009e910538b9c3709d302f54c2d10eb245cf38"
Refs #31224 -- Added autoconversion of test async methods.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:5>

Django

unread,
Mar 13, 2020, 2:37:03 AM3/13/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
------------------------------+-----------------------------------------
Reporter: felixxm | Owner: Andrew Godwin
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"40a64dd1e24d45f8e00a55b22a5174b8f1359b5c" 40a64dd1]:
{{{
#!CommitTicketReference repository=""
revision="40a64dd1e24d45f8e00a55b22a5174b8f1359b5c"
Refs #31224 -- Doc'd async adapter functions.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:6>

Django

unread,
Mar 13, 2020, 2:38:12 AM3/13/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
------------------------------+-----------------------------------------
Reporter: felixxm | Owner: Andrew Godwin
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"8d4638db20e73ffa451d4a21b0112c2b06ea6906" 8d4638db]:
{{{
#!CommitTicketReference repository=""
revision="8d4638db20e73ffa451d4a21b0112c2b06ea6906"
[3.0.x] Refs #31224 -- Doc'd async adapter functions.

Backport of 40a64dd1e24d45f8e00a55b22a5174b8f1359b5c from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:7>

Django

unread,
Mar 17, 2020, 6:00:37 AM3/17/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
-------------------------------------+-------------------------------------

Reporter: felixxm | Owner: Andrew
| Godwin
Type: New feature | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:8>

Django

unread,
Mar 18, 2020, 3:20:18 PM3/18/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: Andrew
| Godwin
Type: New feature | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"fc0fa72ff4cdbf5861a366e31cb8bbacd44da22d" fc0fa72f]:
{{{
#!CommitTicketReference repository=""
revision="fc0fa72ff4cdbf5861a366e31cb8bbacd44da22d"
Fixed #31224 -- Added support for asynchronous views and middleware.

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

--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:9>

Django

unread,
Apr 14, 2020, 1:26:55 AM4/14/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: Andrew
| Godwin
Type: New feature | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"b5ad450fa6d53186b68f89a4507fdbabc8900f74" b5ad450f]:
{{{
#!CommitTicketReference repository=""
revision="b5ad450fa6d53186b68f89a4507fdbabc8900f74"
Refs #31224 -- Removed incorrect @sync_to_async(thread_sensitive=True)
example.

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

--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:10>

Django

unread,
Apr 14, 2020, 1:27:36 AM4/14/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: Andrew
| Godwin
Type: New feature | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"d292d1163e15ceb3d69e3693e13a722ed93c4383" d292d11]:
{{{
#!CommitTicketReference repository=""
revision="d292d1163e15ceb3d69e3693e13a722ed93c4383"
[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
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:11>

Django

unread,
May 28, 2020, 7:05:30 AM5/28/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: Andrew
| Godwin
Type: New feature | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"d94a9aa0557a459a5b9b7b82a8c043de14f8b1a0" d94a9aa]:
{{{
#!CommitTicketReference repository=""
revision="d94a9aa0557a459a5b9b7b82a8c043de14f8b1a0"
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.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:12>

Django

unread,
May 28, 2020, 7:06:40 AM5/28/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: Andrew
| Godwin
Type: New feature | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"bd389a832aa1480fc76c3fb2bb6f92ea4209e378" bd389a8]:
{{{
#!CommitTicketReference repository=""
revision="bd389a832aa1480fc76c3fb2bb6f92ea4209e378"
[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
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:13>

Django

unread,
Sep 3, 2020, 6:07:04 AM9/3/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: Andrew
| Godwin
Type: New feature | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton@…>):

In [changeset:"8d59075184f4cd2852b374359850ff7aeb412ec1" 8d59075]:
{{{
#!CommitTicketReference repository=""
revision="8d59075184f4cd2852b374359850ff7aeb412ec1"
Refs #31224 -- Made sync_to_async() examples use thread sensitive with ORM
calls.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:14>

Django

unread,
Sep 3, 2020, 6:07:49 AM9/3/20
to django-...@googlegroups.com
#31224: Add asynchronous views.
-------------------------------------+-------------------------------------
Reporter: felixxm | Owner: Andrew
| Godwin
Type: New feature | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"f36c441f80c9c2cf69cbfa3254976aae08ef15f9" f36c441f]:
{{{
#!CommitTicketReference repository=""
revision="f36c441f80c9c2cf69cbfa3254976aae08ef15f9"
[3.1.x] Refs #31224 -- Made sync_to_async() examples use thread sensitive
with ORM calls.

Backport of 8d59075184f4cd2852b374359850ff7aeb412ec1 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:15>

Django

unread,
May 3, 2024, 9:45:28 PMMay 3
to django-...@googlegroups.com
#31224: Add asynchronous views.
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Andrew
| Godwin
Type: New feature | Status: closed
Component: Core (Other) | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by nessita <124304+nessita@…>):

In [changeset:"3614ce2b7cf2dae686728f9cc56cde02272f1784" 3614ce2]:
{{{#!CommitTicketReference repository=""
revision="3614ce2b7cf2dae686728f9cc56cde02272f1784"
Refs #31224 -- Fixed typo in django/test/client.py.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31224#comment:16>
Reply all
Reply to author
Forward
0 new messages