From: Harmon Date: Thu, 19 May 2022 16:20:47 +0000 (-0500) Subject: Deprecate AsyncStream.sample X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e0430748b311cfc0d284897351ae589db0b85ada;p=tweepy.git 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 --- 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")