From 595e574143084628b6625ff3a2c52e176cf4dc34 Mon Sep 17 00:00:00 2001
From: Harmon <Harmon758@gmail.com>
Date: Sat, 30 Apr 2022 06:35:56 -0500
Subject: [PATCH] Note deprecation of compliance messages for Stream.filter

---
 tweepy/streaming.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tweepy/streaming.py b/tweepy/streaming.py
index e9cb00a..57a0330 100644
--- a/tweepy/streaming.py
+++ b/tweepy/streaming.py
@@ -265,6 +265,13 @@ class Stream(BaseStream):
                threaded=False):
         """Filter realtime Tweets
 
+        .. deprecated:: 4.9
+            `The delivery of compliance messages through the Twitter API v1.1
+            endpoint this method uses has been deprecated, and they will stop
+            being delivered beginning October 29, 2022.`_ Twitter API v2 can be
+            used instead with :meth:`StreamingClient.filter` and/or
+            :class:`Client` :ref:`batch compliance <Batch compliance>` methods.
+
         Parameters
         ----------
         follow : list[int | str] | None
@@ -310,6 +317,9 @@ class Stream(BaseStream):
 
         .. _BCP 47: https://tools.ietf.org/html/bcp47
         .. _advanced search: https://twitter.com/search-advanced
+        .. _The delivery of compliance messages through the Twitter API v1.1
+            endpoint this method uses has been deprecated, and they will stop
+            being delivered beginning 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.running:
             raise TweepyException("Stream is already connected")
-- 
2.25.1