From 951fb19ddbf0a61d3624b879a239bef4e92c5460 Mon Sep 17 00:00:00 2001 From: Harmon Date: Sat, 23 Oct 2021 11:49:05 -0500 Subject: [PATCH] Add FAQ section on StreamListener for v4 --- docs/faq.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/faq.rst b/docs/faq.rst index dd904c3..9f5378f 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -73,6 +73,18 @@ These parameters can be passed as keyword arguments instead. Refer to the documentation for the :class:`API` method being used. +Where did ``StreamListener`` go? +-------------------------------- + +If you're attempting to import ``StreamListener`` with Tweepy v4, you'll get an +:class:`AttributeError` about ``tweepy`` not having a ``StreamListener`` +attribute. + +This is because Tweepy v4.0.0 merged ``StreamListener`` into :class:`Stream`. + +To use Tweepy v4, you'll need to update your code to subclass :class:`Stream` +instead. + Twitter API v2 ============== -- 2.25.1