From 59872045009ffb4bb5f42af3938c6a5722fc4f4c Mon Sep 17 00:00:00 2001 From: Harmon Date: Mon, 11 Jan 2021 10:00:38 -0600 Subject: [PATCH] Fix AsyncStream.task assignment --- tweepy/asynchronous/streaming.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tweepy/asynchronous/streaming.py b/tweepy/asynchronous/streaming.py index 225b8f6..39b3913 100644 --- a/tweepy/asynchronous/streaming.py +++ b/tweepy/asynchronous/streaming.py @@ -192,7 +192,7 @@ class AsyncStream: if stall_warnings: body["stall_warnings"] = "true" - self.task = await asyncio.create_task( + self.task = asyncio.create_task( self._connect("POST", endpoint, headers=headers, body=body or None) ) return self.task @@ -221,7 +221,7 @@ class AsyncStream: if stall_warnings: params["stall_warnings"] = "true" - self.task = await asyncio.create_task( + self.task = asyncio.create_task( self._connect("GET", endpoint, params=params) ) return self.task -- 2.25.1