New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StreamingClient: rate limit implementation incorrect #1986
Comments
It's probably worth mentioning that in twitter's v1.1 streaming API the rate limit error code was 420. In the v2 Streaming API the rate limit code changed to 429. Edit: After some more digging the socket read timeout has changed as well. v1.1 suggests using a 90 second read timeout while v2 suggests a 20 seconds read timeout. Currently the code uses the 90 second read timeout for all streaming endpoints. |
This is partially a duplicate of #1982.
Correct, I must have missed the change/difference when I implemented streaming for Twitter API v2.
This is a separate documentation issue arising from the fact that
Each time you connect to the stream is a request being made to the endpoint.
Good catch. I hadn't noticed that yet. |
Resolves part of tweepy#1986
This should be resolved with 3a71c9e now. |
This should be resolved with 7f0d587 (Tweepy's 3000th commit 🎉) now. |
The
BaseStream
class checks the 420 HTTP error code, while it should be 429.tweepy/tweepy/streaming.py
Line 113 in 33e444a
Also: the
wait_on_rate_limit
argument ofStreamingClient
is misleading, because it only impacts theadd_rules
anddelete_rules
methods. It has no impact on thefilter
orsample
methods.Related to this: how does a rate limit exactly work for a stream? Apparently you can make 50 requests per 15 minutes to the stream endpoint, but what does this mean exactly in the context of a stream?
The text was updated successfully, but these errors were encountered: