1
0
mirror of https://github.com/django/django.git synced 2024-12-30 21:16:26 +00:00
Commit Graph

18 Commits

Author SHA1 Message Date
Carlton Gibson
ae824eceb1 [4.2.x] Fixed #34428 -- Made ASGIStaticFilesHandler adapt response to async iterator.
Bug in 0bd2c0c901.
Backport of 02c356f2f3 from main
2023-03-21 20:52:59 +01:00
Carlton Gibson
0bd2c0c901 Fixed #33735 -- Added async support to StreamingHttpResponse.
Thanks to Florian Vazelle for initial exploratory work, and to Nick
Pope and Mariusz Felisiak for review.
2022-12-22 10:41:12 +01:00
Carlton Gibson
f476c8847a Refs #33173, Refs #33755 -- Fixed ResourceWarning from unclosed files in ASGI tests. 2022-08-04 10:00:36 +02:00
Jonas Lundberg
e96320c917 Fixed #33755 -- Moved ASGI body-file cleanup into request class. 2022-06-09 11:11:45 +02:00
Jonas Lundberg
f1e0fc645b Fixed #33754 -- Fixed crash with prematurely closed ASGI request body.
Regression in 441103a04d.
2022-05-31 08:38:00 +02:00
Carlton Gibson
5c67d906fd Removed stale Windows asyncio test skips.
Underlying issue was fixed in Python 3.8.1, now many versions ago.
https://bugs.python.org/issue38563
2022-04-14 10:43:34 +02:00
django-bot
9c19aff7c7 Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
Allan Feldman
36fa071d6e Fixed #32889 -- Allowed per-request sync_to_async context in ASGIHandler .
By using a asgiref's ThreadSensitiveContext context manager, requests
will be able to execute independently of other requests when sync work
is involved.

Prior to this commit, a single global thread was used to execute any
sync work independent of the request from which that work was scheduled.
This could result in contention for the global sync thread in the case
of a slow sync function.

Requests are now isolated to their own sync thread.
2021-07-01 12:13:19 +02:00
Markus Holtermann
50a5f8840f Refs #32394 -- Changed STATIC_URL/MEDIA_URL to relative paths in tests and docs where appropriate. 2021-02-06 13:41:35 +01:00
Christopher Keith
76181308fb
Fixed #31550 -- Adjusted ASGI test_file_response for various Windows content types. 2020-11-05 08:18:45 +01:00
Joshua Massover
92309e53d9 Fixed #31594 -- Added ASGIStaticFilesHandler.get_response_async(). 2020-06-08 12:52:26 +02:00
Carlton Gibson
92507bf3ea Fixed #31515 -- Made ASGIHandler dispatch lifecycle signals with thread sensitive. 2020-05-06 09:42:02 +02:00
Andrew Godwin
fc0fa72ff4 Fixed #31224 -- Added support for asynchronous views and middleware.
This implements support for asynchronous views, asynchronous tests,
asynchronous middleware, and an asynchronous test client.
2020-03-18 19:59:12 +01:00
Andrew Godwin
17009e9105 Refs #31224 -- Added autoconversion of test async methods. 2020-03-05 14:29:21 +01:00
Jon Dufresne
39791c8e6d Harmonized Windows checks in tests to a single style. 2019-11-06 15:14:30 +01:00
Carlton Gibson
e83c300a33 Fixed #30900 -- Skipped async-related tests on Windows using Python 3.8.0.
Refs https://bugs.python.org/issue38563.
2019-10-24 10:43:05 +02:00
Mariusz Felisiak
7f19e37135 Refs #30451 -- Added more tests for ASGIRequest and ASGIHandler. 2019-06-20 12:29:58 +02:00
Andrew Godwin
a415ce70be Fixed #30451 -- Added ASGI handler and coroutine-safety.
This adds an ASGI handler, asgi.py file for the default project layout,
a few async utilities and adds async-safety to many parts of Django.
2019-06-20 12:29:43 +02:00