summaryrefslogtreecommitdiff
path: root/django/http
diff options
context:
space:
mode:
authorNick Pope <nick@nickpope.me.uk>2023-01-18 12:45:07 +0000
committerGitHub <noreply@github.com>2023-01-18 13:45:07 +0100
commit26a395f27d86bbf65f330851c8136c33694ac867 (patch)
tree70c1ab33cf0740889a7d6bccfa7e7e056f67211f /django/http
parenta04565845ae3e766a1a4ec827a6e1f4fac335c3a (diff)
Refs #34233 -- Used aiter() and anext().
Available since Python 3.10.
Diffstat (limited to 'django/http')
-rw-r--r--django/http/response.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/http/response.py b/django/http/response.py
index 465a8553dc..f62dec8ce9 100644
--- a/django/http/response.py
+++ b/django/http/response.py
@@ -502,7 +502,7 @@ class StreamingHttpResponse(HttpResponseBase):
self._iterator = iter(value)
self.is_async = False
except TypeError:
- self._iterator = value.__aiter__()
+ self._iterator = aiter(value)
self.is_async = True
if hasattr(value, "close"):
self._resource_closers.append(value.close)