lp:~robru/gwibber/twitter
- Get this branch:
- bzr branch lp:~robru/gwibber/twitter
Branch merges
- Barry Warsaw: Pending requested
-
Diff: 2245 lines (+1180/-847)12 files modifiedgwibber/gwibber/protocols/twitter.py (+275/-6)
gwibber/gwibber/testing/mocks.py (+13/-7)
gwibber/gwibber/tests/data/twitter-home.dat (+344/-0)
gwibber/gwibber/tests/test_dbus.py (+5/-0)
gwibber/gwibber/tests/test_download.py (+41/-0)
gwibber/gwibber/tests/test_protocols.py (+52/-0)
gwibber/gwibber/tests/test_twitter.py (+296/-8)
gwibber/gwibber/utils/base.py (+31/-6)
gwibber/gwibber/utils/download.py (+34/-1)
gwibber/microblog/plugins/twitter/__init__.py (+0/-819)
gwibber/tools/debug_live.py (+67/-0)
gwibber/tools/debug_slave.py (+22/-0)
Branch information
Recent revisions
- 1490. By Robert Bruce Park
-
Prevent duplicate message ids from filling up the message_ids column.
It turns out that it's quite easy to see the same message multiple
times, and previously the dupe-checking logic was successful in
stopping the message from being published more than once, it blindly
appended the message_id to the list regardless of whether or not it
was already on the list, so that tended to fill up with junk quick.With test case.
- 1489. By Robert Bruce Park
-
Implement a basic rate limiter.
This had to be done in the Downloader class unfortunately because it
needed direct access to the HTTP headers and I didn't really see any
way to access those outside of the Downloader class.Luckily it will harmlessly ignore any protocol that doesn't specify
rate limits in the HTTP headers, so it should work well for Twitter
and do nothing for anybody else.This basically makes no attempt to limit you if you have more than 5
requests remaining in the rate limit window (making it unobtrusive for
cases where the dispatcher is just calling every 5 minutes and it
really should never come near the rate limiter *anyway*), but if
something has gone on such as a user requesting too many manual
refreshes, then it will forcibly pause each request long enough to
avoid hitting Twitter's rate limiter. - 1484. By Robert Bruce Park
-
Fix up Base._unpublish: Better tests, bugs fixed.
Particularly I've fixed the removal of ids when there were duplicates
before, and also I've eliminated the possibility of collisions between
message id's from different services (there used to be a small chance
that twitter and facebook could assign the same message id to
different messages, and then _unpublish would get confused.And of course, improved test coverage to prove that this is all good
now ;-)
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:gwibber