Releases: tweepy/tweepy
Releases · tweepy/tweepy
4.6.0
This will be the last minor version to support Python 3.6 (#1788).
New Features / Improvements
- Add support for streaming with Twitter API v2 (86244c1)
- Refactor
Client
andStream
to inherit from newBaseClient
andBaseStream
classes and addStreamingClient
,StreamResponse
, andStreamRule
- Refactor
- Add support for new
max_results
andpagination_token
parameters forClient.get_liking_users
(bdd6b55) - Add support for new
max_results
andpagination_token
parameters forClient.get_retweeters
(3479e56) - Add support for new
sort_order
parameter forClient.search_all_tweets
(bd202e5) - Add support for new
sort_order
parameter forClient.search_recent_tweets
(8b47170) - Add
Client.get_space_tweets
(c8d5d9a) - Add
Space.subscriber_count
(1ffc8cd) - Use
repr
of text inTweet.__repr__
(4e2997e)- This avoids including inconstant newlines, rather than escaped newlines, in the string representation of the Tweet object, making it more consistent
- Override
Mapping.__contains__
inDataMapping
(9f10a58)- This allows membership tests to check for existence within data in Twitter API v2 models, rather than existence of the attribute at all
- Initialize
Stream.session
withinStream.__init__
(80adf5b)- Update the user agent based on
Stream.user_agent
even ifStream.session
is already initialized
- Update the user agent based on
- Use oauthlib to create code challenge and verifier for PKCE (eb22416)
Bug Fixes
- Fix datetime endpoint parameter formatting in
Client._make_request
(#1793)
Misc
4.5.0
New Features / Improvements
- Revamp authentication interface
- Add support for OAuth 2.0 Authorization Code Flow with PKCE
- Rename
OAuthHandler
toOAuth1UserHandler
(fb6eb7d)OAuthHandler
is kept as a deprecated alias (cba7317)
- Rename
AppAuthHandler
toOauth2AppHandler
(529d793)AppAuthHandler
is kept as a deprecated alias (d4ceb1a)
- Rename
OAuth2Bearer
toOAuth2BearerHandler
(0781fde) - Allow passing access token and secret directly to
OAuth1UserHandler.__init__
(99f3583)- Note, this changes the
callback
parameter to be the fifth argument, positionally
- Note, this changes the
- Allow
OAuth2BearerHandler
to be used asauth
parameter forAPI
(5a2a3fc) - Remove
AuthHandler
(d600c4c) - Remove
OAuth1UserHandler.get_xauth_access_token
(8e2de9f) - Update and improve authentication documentation (f9a722b)
- Other improvements and optimizations
- Add
Client.get_me
(c49cbdf, 62b5b58, f6895d3, bb87b26) - Add support for
Media.url
(#1722) - Use requests exception to handle
JSONDecodeError
(b492b0a)- Update requests dependency requirement to >= 2.27.0 (ed66e8e)
Bug Fixes
- Fix
Response.includes["polls"]
not beingPoll
objects (#1733) - Fix
Paginator
handling ofClient.get_all_tweets_count
(#1761)
Misc
4.4.0
4.3.0
4.2.0
New Features / Improvements
- Add support for managing lists with Twitter API v2 (b1342bf)
- Rename
Client.follow
andClient.unfollow
toClient.follow_user
andClient.unfollow_user
, respectively (8f8de15)Client.follow
andClient.unfollow
are kept as deprecated aliases
- Add FAQ section in documentation
- Update and improve various documentation and tests
Twitter API Changes
- Change
state
to optional parameter forClient.search_spaces
(e61d5d6)
Bug Fixes
4.1.0
New Features / Improvements
- Add support for Python 3.10 (229b738)
- Update minimum dev requirement version for tox to 3.14.0
- Add support for Spaces (5c68892)
- Add
Space
model - Add
Client.search_spaces
,Client.get_spaces
, andClient.get_space
- Add
- Add support for batch compliance (6ca75e1)
- Add
Client.get_compliance_jobs
,Client.get_compliance_job
, andClient.create_compliance_job
- Add
- Add
Client.get_muted
(00cdab8) - Minor documentation corrections
4.0.1
Bug Fixes
- Fix handling of strings passed as fields parameters for
Client
methods (d61a5d9) - Include unexpected parameters passed to
Client
methods in Twitter API request (618d1c2)- This future-proofs for new endpoint parameters
- Stop checking parameter names when converting parameters passed to
Client
methods from datetimes to strings (1320a37)- This future-proofs for new endpoint parameters besides
start_time
andend_time
that accept datetimes
- This future-proofs for new endpoint parameters besides
- Handle simplejson being installed when handling
JSONDecodeError
inHTTPException
(586c162)
Misc
4.0.0
Major New Features / Improvements
-
Support Twitter API v2 (#1472, #1535)
- Replace API v1.1 models in package namespace
-
Rework
API
- Replace
bind_api
andAPIMethod
withAPI.request
- Stop using property decorators for
API
methods - Use
pagination
decorator
- Stop using property decorators for
- Add
requests.Session
instance asAPI.session
attribute (2f28757)- Initialize a single
requests.Session
instance perAPI
instance, rather than for each request
- Initialize a single
- Log warning when API.request is passed an unexpected keyword argument that isn't an endpoint parameter (c82d7ac)
- Rename allowed parameters (
allowed_param
) to endpoint parameters (endpoint_parameters
) (b4fc6a0) - Rename methods and method parameters (see Backwards-Incompatible Changes section)
- Require parameters for methods (see Backwards-Incompatible Changes section)
- Stop allowing arbitrary positional arguments for methods (see Backwards-Incompatible Changes section)
- Remove unnecessary attributes and parameters (see Backwards-Incompatible Changes section)
- Improve, optimize, and simplify
API.request
and otherAPI
methods
- Replace
-
Rework streaming
StreamListener
has been merged intoStream
(see Backwards-Incompatible Changes section)Stream
data/event handling methods (i.e. those starting withon_
) now log by default and disregard return values- Allow the stream to disconnect when any line of data is received, including keep-alive signals (#773, #897)
- Remove, rename, and replace attributes, methods, and parameters (see Backwards-Incompatible Changes section)
- Improve, optimize, and simplify
Stream
-
Rework documentation
- Automatically use docstrings for documentation
- Use NumPy style docstrings
- Use Intersphinx linking
- Add tooltips for cross references using sphinx-hoverxref
- Document
Stream
(18a6059) - Document models (0724060, 78a0c22)
- Document pagination (695d531, 652fece)
- Add table for
API
documentation (6db8e4c) - Separate documentation for exceptions (8a831b1)
- Move changelog to documentation (fc98629)
- Update, improve, and organize documentation
-
Rework exceptions
Backwards-Incompatible Changes
API
- Rename
API
andmodels
methodsAPI.blocks
->API.get_blocks
(9541794)API.blocks_ids
->API.get_blocked_ids
(e241ca4)API.destroy_direct_message
->API.delete_direct_message
(2731fc9)DirectMessage.destroy
->DirectMessage.delete
(2731fc9)
API.favorites
->API.get_favorites
(3c467da)API.followers
->API.get_followers
(ce768d9)API.followers_ids
->API.get_follower_ids
(fa5e7c4)models.User.followers_ids
->models.User.follower_ids
(fa5e7c4)
API.friends
->API.get_friends
(6f3fccb)API.friends_ids
->API.get_friend_ids
(bab3e5e)API.friendships_incoming
->API.incoming_friendships
(007bd07)API.friendships_outgoing
->API.outgoing_friendships
(1400065)API.geo_search
->API.search_geo
(6f4fb39)API.list_direct_messages
->API.get_direct_messages
(ff1186f)API.list_members
->API.get_list_members
(5845f02)API.list_subscribers
->API.get_list_subscribers
(a05b630)API.lists_all
->API.get_lists
(458e0e8)API.lists_memberships
->API.get_list_memberships
(9dddc12)models.User.lists_memberships
->models.User.list_memberships
(9dddc12)
API.lists_subscriptions
->API.get_list_subscriptions
(51945a7)models.User.lists_subscriptions
->models.User.list_subscriptions
(51945a7)
API.mutes
->API.get_mutes
(744edc2)API.mutes_ids
->API.get_muted_ids
(ea26a29)API.retweeters
->API.get_retweeter_ids
(588c342)API.retweets
->API.get_retweets
(3b3ba24)API.retweets_of_me
->API.get_retweets_of_me
(737bd0b)API.saved_searches
->API.get_saved_searches
(8b39f74)API.search
->API.search_tweets
(7fac253)API.show_friendship
->API.get_friendship
(ee9ea2e)API.show_list_member
->API.get_list_member
(431ab15)API.show_list_subscriber
->API.get_list_subscriber
(bf26301)API.statuses_lookup
->API.lookup_statuses
(#477)API.trends_available
->API.available_trends
(68b33d7)API.trends_closest
->API.closest_trends
(2e18162)API.trends_place
-> ...
3.10.0
This will be the last major and minor version to support Python 2.7 (#1253) and Python 3.5.
The next non-patch release should be version 4.0.0.
New Features / Improvements
- Add
API.search_30_day
andAPI.search_full_archive
(#1175, #1294) - Update allowed parameters for
API.home_timeline
(#1410, #1458)- Add
trim_user
,exclude_replies
,include_entities
- Remove
page
as erroneously documented parameter - Reorder
count
to be the first parameter
- Add
- Update allowed parameters for
API.get_oembed
- Add
hide_thread
,theme
,link_color
,widget_type
,dnt
- Remove
id
- Add
- Remove
API.update_profile_background_image
(#1466) - Add support for Python 3.9
- Switch from Travis CI to GitHub Actions to run tests and deploy releases (#1402)
- Update and improve various documentation
Bug Fixes
- Use
mimetypes.guess_type
as fallback for determining image file type (#1411) - Use proper MIME type in Content-Type header for uploaded images
- Allow
file
parameter to be used again forAPI.media_upload
(#1412, #1413) - Allow
file
parameter to be used again forAPI.update_profile_banner
,API.update_profile_image
, andAPI.update_with_media
(#1475) - Fix
User.lists
,User.lists_memberships
, andUser.lists_subscriptions
to retrieve information about the user in question rather than the authenticating user (#1443, #1444)
3.9.0
New Features / Improvements
- Add
API.create_media_metadata
(#716) - Update allowed parameters for
API.update_status
(#1101)- Add
exclude_reply_user_ids
,attachment_url
,possibly_sensitive
,trim_user
,enable_dmcommands
,fail_dmcommands
,card_uri
- Remove
in_reply_to_status_id_str
,source
- Add
- Add allowed parameters to
API.get_status
trim_user
,include_my_retweet
,include_entities
,include_ext_alt_text
,include_card_uri
- Add allowed parameters to
API.statuses_lookup
include_ext_alt_text
,include_card_uri
- Improve
API.lookup_users
(#706) - Improve and optimize
API.statuses_lookup
,API.create_media_metadata
,API.update_status
- Add
reverse
as allowed parameter forAPI.lists_all
- Add
count
as allowed parameter forAPI.lists_memberships
- Add
count
as allowed parameter forAPI.lists_subscriptions
- Add
include_entities
as allowed parameter forAPI.list_timeline
- Add allowed parameters to
API.list_subscribers
count
,include_entities
,skip_status
- Add support for Python 3.8
- Update and improve setup.py
- Use requests socks extra instead of requiring PySocks directly
- Allow uploading of images with file names without extensions (#1060, #1086)
- Support uploading WebP images (#1298)
- Add missing attributes to
Relationship
model (#1375) - Update max allowed size for uploaded GIFs (#1336, #1338)
- Add
_json
attribute toDirectMessage
model (#1342) - Update and improve tests (#1217)
- Add documentation for extended Tweets
- Document
API.lookup_users
(#539) - Add documentation for running tests (#681)
- Add Korean translation of documentation (#1296)
- Add Polish translation of documentation (#1316)
- Document
API.lookup_friendships
(#1375) - Update and improve various documentation