Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

v3.2

Compare
Choose a tag to compare
@bear bear released this 24 Nov 20:11
· 278 commits to master since this release

Version 3.2

Deprecations

Nothing is being deprecationed this version, however here's what's being deprecated as of v. 3.3.0:

  • :py:func:twitter.api.Api.UpdateBackgroundImage. Please make sure that your code does not call this function as it will be returning a hard error. There is no replace function. This was deprecated by Twitter around July 2015.
  • :py:func:twitter.api.Api.PostMedia will be removed. Please use :py:func:twitter.api.Api.PostUpdate instead.
  • :py:func:twitter.api.Api.PostMultipleMedia. Please use :py:func:twitter.api.Api.PostUpdate instead.
  • :py:func:twitter.api.GetFriends will no longer accept a cursor or count parameter. Please use :py:func:twitter.api.GetFriendsPaged instead.
  • :py:func:twitter.api.GetFollowers will no longer accept a cursor or count parameter. Please use :py:func:twitter.api.GetFollowersPaged instead.

What's New

  • We've added new deprecation warnings, so it's easier to track when things go away. All of python-twitter's deprecation warnings will be a subclass of :py:class:twitter.error.PythonTwitterDeprecationWarning and will have a version number associated with them such as :py:class:twitter.error.PythonTwitterDeprecationWarning330.
  • :py:class:twitter.models.User now contains a following attribute, which describes whether the authenticated user is following the User. PR #351 <https://github.com/bear/python-twitter/pull/351>_
  • :py:class:twitter.models.DirectMessage contains a full :py:class:twitter.models.User object for both the DirectMessage.sender and DirectMessage.recipient properties. PR #384 <https://github.com/bear/python-twitter/pull/384>_.
  • You can now upload Quicktime movies (*.mov). PR #372 <https://github.com/bear/python-twitter/pull/372>_.
  • If you have a whitelisted app, you can now get the authenticated user's email address through a call to :py:func:twitter.api.Api.VerifyCredentials(). If your app isn't whitelisted, no error is returned. PR #376 <https://github.com/bear/python-twitter/pull/376>_.
  • Google App Engine support has been reintegrated into the library. Check out PR #383 <https://github.com/bear/python-twitter/pull/383>_.
  • video_info is now available on a twitter.models.Media object, which allows access to video urls/bitrates/etc. in the extended_entities node of a tweet.

What's Changed

  • :py:class:twitter.models.Trend's volume attribute has been renamed tweet_volume in line with Twitter's naming convention. This change should allow users to access the number of tweets being tweeted for a given Trend. PR #375 <https://github.com/bear/python-twitter/pull/375>_
  • :py:class:twitter.ratelimit.RateLimit should behave better now and adds a 1-second padding to requests after sleeping.
  • :py:class:twitter.ratelimit.RateLimit now keeps track of your rate limit status even if you don't have sleep_on_rate_limit set to True when instatiating the API. If you want to add different behavior on hitting a rate limit, you should be able to now by querying the rate limit object. See PR #370 <https://github.com/bear/python-twitter/pull/370>_ for the technical details of the change. There should be no difference in behavior for the defaults, but let us know.

Bugfixes

  • :py:class:twitter.models.Media again contains a sizes attribute, which was missed back in the Version 3.0 release. PR #360 <https://github.com/bear/python-twitter/pull/360>_
  • The previously bloated :py:func:twitter.api.Api.UploadMediaChunked() function has been broken out into three related functions and fixes two an incompatibility with python 2.7. Behavior remains the same, but this should simplify matters. PR #347 <https://github.com/bear/python-twitter/pull/347>_
  • Fix for :py:func:twitter.api.Api.PostUpdate() where a passing an integer to the media parameter would cause an iteration error to occur. PR #347 <https://github.com/bear/python-twitter/pull/347>_
  • Fix for 401 errors that were occuring in the Streaming Endpoints. PR #364 <https://github.com/bear/python-twitter/pull/364>_