diff options
| author | Simon Charette <charette.s@gmail.com> | 2024-08-09 12:48:32 -0400 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2024-08-28 11:44:05 -0300 |
| commit | c042fe3a74fb213c93b1052f7de4d99a6e6948e0 (patch) | |
| tree | ab4a7455b16173ca64646191f4e09a9bdfb35c3c /django/http | |
| parent | 7e6e1c8383dbb1fb543e6d1f0e5ca58fc01494c4 (diff) | |
Refs #33735 -- Adjusted warning stacklevel in StreamingHttpResponse.__iter__()/__aiter__().
Diffstat (limited to 'django/http')
| -rw-r--r-- | django/http/response.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/http/response.py b/django/http/response.py index 0d756403db..abe71718f2 100644 --- a/django/http/response.py +++ b/django/http/response.py @@ -498,6 +498,7 @@ class StreamingHttpResponse(HttpResponseBase): "StreamingHttpResponse must consume asynchronous iterators in order to " "serve them synchronously. Use a synchronous iterator instead.", Warning, + stacklevel=2, ) # async iterator. Consume in async_to_sync and map back. @@ -518,6 +519,7 @@ class StreamingHttpResponse(HttpResponseBase): "StreamingHttpResponse must consume synchronous iterators in order to " "serve them asynchronously. Use an asynchronous iterator instead.", Warning, + stacklevel=2, ) # sync iterator. Consume via sync_to_async and yield via async # generator. |
