From e0430748b311cfc0d284897351ae589db0b85ada Mon Sep 17 00:00:00 2001 From: Harmon Date: Thu, 19 May 2022 11:20:47 -0500 Subject: [PATCH] Deprecate AsyncStream.sample https://twittercommunity.com/t/deprecation-announcement-removing-compliance-messages-from-statuses-filter-and-retiring-statuses-sample-from-the-twitter-api-v1-1/170500 --- tweepy/asynchronous/streaming.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tweepy/asynchronous/streaming.py b/tweepy/asynchronous/streaming.py index 21241e3..af68117 100644 --- a/tweepy/asynchronous/streaming.py +++ b/tweepy/asynchronous/streaming.py @@ -328,6 +328,11 @@ class AsyncStream(AsyncBaseStream): def sample(self, *, languages=None, stall_warnings=False): """Sample realtime Tweets + .. deprecated:: 4.10 + `The Twitter API v1.1 endpoint this method uses is now deprecated + and will be retired on October 29, 2022.`_ Twitter API v2 can be + used instead with :meth:`AsyncStreamingClient.sample`. + Parameters ---------- languages : list[str] | None @@ -358,6 +363,8 @@ class AsyncStream(AsyncBaseStream): .. _BCP 47: https://tools.ietf.org/html/bcp47 .. _advanced search: https://twitter.com/search-advanced + .. _The Twitter API v1.1 endpoint this method uses is now deprecated + and will be retired on October 29, 2022.: https://twittercommunity.com/t/deprecation-announcement-removing-compliance-messages-from-statuses-filter-and-retiring-statuses-sample-from-the-twitter-api-v1-1/170500 """ if self.task is not None and not self.task.done(): raise TweepyException("Stream is already connected") -- 2.25.1