Skip to content

Releases: tweepy/tweepy

4.14.0

24 Apr 22:16
bb0f581
Compare
Choose a tag to compare

New Features / Improvements

  • Add constants for potential model object fields (f3f73bc)
    • DIRECT_MESSAGE_EVENT_FIELDS
    • DM_EVENT_FIELDS
    • LIST_FIELDS
    • MEDIA_FIELDS
    • PLACE_FIELDS
    • POLL_FIELDS
    • PUBLIC_SPACE_FIELDS
    • SPACE_FIELDS
    • PUBLIC_TWEET_FIELDS
    • TWEET_FIELDS
    • USER_FIELDS
  • Add creator_id field for Space (a13726a)

Twitter API Backwards-Incompatible Changes

  • Remove support for streaming with Twitter API v1.1 status/filter endpoint (c8a02eb)
    • Stream
    • AsyncStream
  • Remove support for deprecated Premium v1.1 Search APIs (a955f30)
    • API.search_30_day
    • API.search_full_archive

Misc

  • Overhaul Getting Started documentation (addb9f7)
  • Remove no longer valid Twitter API version badges in README (880e7bf)
  • Update and improve various documentation

4.13.0

09 Mar 17:20
6ffc734
Compare
Choose a tag to compare

New Features / Improvements

  • Add verified_type field for User (9f7afae)

Twitter API Backwards-Incompatible Changes

  • Remove streaming methods using retired Twitter API v1.1 features (0cd96b1)
    • Twitter API v1.1 statuses/sample endpoint
      • Stream.sample
      • AsyncStream.sample
    • Compliance messages on the Twitter API v1.1 statuses/filter endpoint
      • Stream.on_delete, Stream.on_scrub_geo, Stream.on_status_withheld, Stream.on_user_withheld
      • AsyncStream.on_delete, AsyncStream.on_scrub_geo, AsyncStream.on_status_withheld, AsyncStream.on_user_withheld

Twitter API Deprecations

  • Deprecate streaming with Twitter API v1.1 statuses/filter endpoint (8b9c547)
    • Stream
    • AsyncStream

Bug Fixes

  • Return base class method values in StreamingClient._process_data and AsyncStreamingClient._process_data methods (2744073)
  • Handle empty payloads in JSONParser.parse (e854138, #2051)

Twitter API Bug Handling

  • Handle incorrect processing state for errored chunked uploads (a68ce86)

Misc

  • Support async-lru v2 (f98b345)
  • Document specific expansions available for each type of payload (7df6453)
  • Add documentation for Direct Message events (c689548)
  • Update documentation for dm_event_fields parameter (e2fb467)
  • Add section in documentation about dm_event_fields parameter (4b0fa90)
  • Add expansions documentation for Direct Message conversation events (#2009)
  • Add note in documentation about removal of Tweet source field (5d22a01)
  • Add SECURITY.md (b79a1db, 3d3d58e)
  • Update copyright years to include 2023 (ccc9526)

4.12.1

06 Nov 20:27
cc8dd49
Compare
Choose a tag to compare

Bug Fixes

  • Add 1 second buffer to API v2 streaming timeout (51a5d61)
    • The keep-alive is often received after marginally longer than 20 seconds, causing unnecessary timeouts and reconnects with a timeout of exactly 20 seconds
  • Default AsyncBaseStream to abort closed SSL transports (#1904)
  • Warn when Tweet data is missing default edit_history_tweet_ids field (3dea0df, #1994)
  • Change initial network_error_wait to 0 for streaming (b18c1a6)
    • Attempt to reconnect immediately when established streaming connection drops

Misc

  • Document limit and pagination_token parameters for Paginator and AsyncPaginator (e98ab02, bb934fc)
  • Use separate method to construct Response in Client and AsyncClient (#1997, 9983735)
  • Log streaming connection error exceptions (b7f02c6)
  • Add CITATION.cff (2547b44)
  • Add DOI badge to README (72a33c9)
  • Replace docs/requirements.txt with docs extra (0ccfe86)
  • Fix Intersphinx link to namedtuple in documentation for Response (352c74a)
  • Improve format of badges in README (d41c813)

4.12.0

28 Oct 03:30
a07d225
Compare
Choose a tag to compare

New Features / Improvements

  • Add support for Direct Messages with Twitter API v2 (#1995)
    • Add DirectMessageEvent model
    • Add Client.get_direct_message_events, Client.create_direct_message, and Client.create_direct_message_conversation
    • Add AsyncClient.get_direct_message_events, AsyncClient.create_direct_message, and AsyncClient.create_direct_message_conversation
  • Add support for Python 3.11 (a391c66)
  • Add support for variants Media field (#1910, e31be15)

Bug Fixes

  • Handle different method return types in API v2 pagination (#1843, #1861, 381bf91, 3874579)
  • Add missing angle bracket to string representation of ReferencedTweet (d4df069)

Misc

  • Add documentation for edit_history_tweet_ids and edit_controls Tweet fields (2b1e159)
    • This documentation was previously missing from Twitter's API documentation
  • Fix class references in notes in documentation for AsyncClient methods (f737b87)
  • Fix signature of Client.get_quote_tweets in documentation (6f7de39)
  • Update actions/setup-python from v2 to v4 (f16b3dc, 0148be7)

4.11.0

24 Oct 22:32
18a34f0
Compare
Choose a tag to compare

New Features / Improvements

  • Add support for retrieving edited Tweet metadata
    • Add support for include_ext_edit_control parameter for API methods (e122f35, e736770)
    • Add support for edit_history_tweet_ids and edit_controls Tweet fields (#1979, a1c104f)
  • Add asynchronous.AsyncPaginator for pagination for AsyncClient (33e444a)
  • Add support for exclude parameter for get_quote_tweets (4f28bd8, 17e02b7, 48ebdb7)

Bug Fixes

  • Handle 429 HTTP errors for streaming (#1982, #1986)
  • Lower API v2 streaming timeout to 20 seconds (#1986)
  • Regenerate Authorization header prior to any reconnection requests for AsyncStream (29bbb7b, a4c6325, 5ade386)
  • Use tuple for endpoint_parameters argument in API.indicate_direct_message_typing (396ab84)
  • Update models.List methods to pass keyword arguments to API methods (#1987)
  • Update models.List methods to use list ID instead of slug (73f6308)

Misc

  • Log text of HTTP response when handling request error in AsyncBaseStream (51c3762)
  • Update signature for get_list_tweets in documentation (86577b1)
    • Add media_fields, place_fields, and poll_fields parameters
  • Add version changed directive to documentation for get_list_tweets (5cb2616)
  • Improve documentation for wait_on_rate_limit parameter for streaming (#1986)
  • Add release dates to changelog (f665ce6, eafa665, 3f0cc76)
  • Add sections for old and previously missing versions to changelog (6aa1b77)
  • Update cassettes for testing methods that return Tweet objects (872b33e)

4.10.1

23 Aug 01:54
ad5e31b
Compare
Choose a tag to compare

Bug Fixes

  • Fix AsyncBaseClient rate limit handling (#1902)
  • Fix handling of StreamRule when passed in list to StreamingClient.delete_rules or AsyncStreamingClient.delete_rules (#1942)
  • Add support for media_fields, place_fields, and poll_fields parameters for Client.get_list_tweets and AsyncClient.get_list_tweets (#1931)
  • Ignore AsyncClient method parameters explicitly passed as None (#1944)

Misc

  • Log text of HTTP response when handling request error in BaseStream (598ea64)
  • Update Requests documentation URL for Intersphinx linking (2c7213d)
  • Correct typo in documentation for StreamingClient and AsyncStreamingClient add_rules and delete_rules methods (#1937)

4.10.0

20 May 17:36
30ebf01
Compare
Choose a tag to compare

New Features / Improvements

  • Add asynchronous interfaces for Twitter API v2
    • Add asynchronous.AsyncClient (0aadd53)
      • Add async_lru as requirement for async extra
    • Add asynchronous.AsyncStreamingClient (9051ba6)
  • Add support for reverse chronological home timeline with Twitter API v2 (#1900)
    • Add Client.get_home_timeline and AsyncClient.get_home_timeline
  • Update the User-Agent header based on AsyncStream.user_agent even if AsyncStream.session is already initialized/set (096a62c)

Twitter API Deprecations

  • Deprecate AsyncStream.sample and note deprecation of compliance messages for AsyncStream.filter (e043074, 1b77007)

Misc

  • Update and improve various documentation and tests

4.9.0

05 May 14:24
dec76e3
Compare
Choose a tag to compare

New Features / Improvements

  • Add support for Direct Message typing indicator and read receipts (#1856)
    • Add API.indicate_direct_message_typing and API.mark_direct_message_read
  • Fallback to "detail" response value for HTTPException message (b6b8241)
  • Handle "error" key of response being a string in HTTPException (2da4452)

Twitter API Deprecations

  • Deprecate Stream.sample and note deprecation of compliance messages for Stream.filter (#1876)

Misc

  • Use setup.cfg for coverage.py configuration (e24bb2f)
    • Explicitly specify coverage >= 4.4.2 requirement for dev extra (b5bd35e)
  • Use setup.cfg for tox configuration (e24bb2f)
    • Update lower bound for dev extra tox requirement to >= 3.21.0 (ba6e6b1)
  • Remove tests_require from setup.py (2870031)
  • Stop creating universal wheels (9d93ec8)
  • Update and improve various documentation and tests

4.8.0

24 Mar 21:00
0eac99b
Compare
Choose a tag to compare

New Features / Improvements

  • Add support for Bookmarks with Twitter API v2 (#1848)
    • Add Client.remove_bookmark, Client.get_bookmarks, Client.bookmark
  • Add support for using OAuth 2.0 Authorization Code Flow with Client methods that require the authenticating user's ID (0157d0b)
    • Raise TypeError for those methods when the access token isn't set
  • Raise NotFound rather than HTTPException when encountering 404 response status codes in BaseClient.request (b6b8219)

4.7.0

17 Mar 23:03
66205b1
Compare
Choose a tag to compare

New Features / Improvements

  • Add support for Quote Tweets lookup with Twitter API v2 (#1844)
    • Add Client.get_quote_tweets

Python Backwards-Incompatible Changes

  • Drop support for Python 3.6, which has reached end-of-life status (#1788)

Bug Fixes

  • Fix Client.follow to return response from Client.follow_user rather than None (0742f54)
  • Fix Client.unfollow to return response from Client.unfollow_user rather than None (c1787f0)

Misc

  • Organize documentation arrangement and improve index / table of contents categorization (c5310d1)
  • Add documentation for API v2 models
    • Add documentation for List (360594b)
    • Add documentation for Media (c2dacc8)
    • Add documentation for Place (e3fa223)
    • Add documentation for Poll (61ed5d7)
    • Add documentation for Space (1a7ea1f)
    • Add documentation for Tweet (b9cef72)
    • Add documentation for ReferencedTweet (9a995b5)
    • Add documentation for User (aa3658e)
  • Use Read the Docs Sphinx search extension for documentation (72c7e01)
  • Add and improve API v2 examples (#1835, 6a6ef98)
  • Use dash instead of underscore for requests-oauthlib requirement (2c94758)
  • Optimize Tweet.referenced_tweets initialization (3299881)
  • Update and improve various documentation