unstale

pypi / tweepy

tweepy

What changed in tweepy 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-23.

79 breaking45 new APIs and options8 behavior and defaults10 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.3 on npm

tweepy 4142 changes

Breaking changes 79

  • The initialization parameter auth_handler is renamed auth, and initialization no longer accepts positional arguments other than auth.

    4.0.0release notes

  • Several API method parameters are renamed, including id to place_id, screen_names to screen_name, environment_name to label, and file_ to file.

    4.0.0release notes

  • Parameters previously optional on listed API methods are now required, including query, status, id, and q on the specified methods.

    4.0.0release notes

  • Many API methods are renamed, including blocks to get_blocks, search to search_tweets, and update_with_media to update_status_with_media.

    4.0.0release notes

  • Listed API methods no longer accept positional arguments; arguments must be passed by keyword.

    4.0.0release notes

  • API.api_root and API.upload_root are removed.

    4.0.0release notes

  • API.compression is removed.

    4.0.0release notes

  • API.configuration was removed.

    4.0.0release notes

  • The id endpoint parameter was removed.

    4.0.0release notes

  • The id endpoint parameter was removed.

    4.0.0release notes

  • The id endpoint parameter was removed.

    4.0.0release notes

  • The id endpoint parameter was removed.

    4.0.0release notes

  • The id endpoint parameter was removed.

    4.0.0release notes

  • The id endpoint parameter was removed.

    4.0.0release notes

  • API.geo_similar_places was removed.

    4.0.0release notes

  • The id endpoint parameter was removed.

    4.0.0release notes

  • The id endpoint parameter was removed.

    4.0.0release notes

  • The id endpoint parameter was removed.

    4.0.0release notes

  • The id endpoint parameter was removed.

    4.0.0release notes

  • The id endpoint parameter was removed.

    4.0.0release notes

  • The map_ keyword argument alias is no longer supported.

    4.0.0release notes

  • API.me, AuthHandler.get_username, and OAuthHandler.get_username are removed.

    4.0.0release notes

  • API.related_results was removed along with the Relation model.

    4.0.0release notes

  • The API is reworked around API.request, replacing bind_api and APIMethod; methods no longer use property decorators, and pagination uses a decorator.

    4.0.0release notes

  • Unexpected keyword arguments that are not endpoint parameters now produce a logged warning; allowed_param is renamed endpoint_parameters.

    4.0.0release notes

  • The accuracy and contained_within endpoint parameters were removed.

    4.0.0release notes

  • API.search_host and API.search_root are removed.

    4.0.0release notes

  • Direct Messages can send Quick Reply Options; quick_reply_type was replaced by quick_reply_options.

    4.0.0release notes

  • The allow_contributor_request endpoint parameter was removed.

    4.0.0release notes

  • The endpoint parameter offset_right was renamed to offset_top.

    4.0.0release notes

  • The enable_dmcommands and fail_dmcommands parameters were removed.

    4.0.0release notes

  • The method's parameters are reordered.

    4.0.0release notes

  • The in_reply_to_status_id_str and auto_populate_reply_metadata endpoint parameters were removed.

    4.0.0release notes

  • The id endpoint parameter was removed.

    4.0.0release notes

  • Handling of HTTP status code 401 was removed.

    4.0.0release notes

  • API.wait_on_rate_limit_notify is removed; warnings are always logged when a rate limit is reached.

    4.0.0release notes

  • return_cursors is now keyword-only.

    4.0.0release notes

  • return_cursors is now keyword-only.

    4.0.0release notes

  • The created_at datetime value is now timezone-aware.

    4.0.0release notes

  • models.List.is_member was removed.

    4.0.0release notes

  • models.List.is_subscribed was removed.

    4.0.0release notes

  • The created_at datetime value is now timezone-aware.

    4.0.0release notes

  • The created_at datetime value is now timezone-aware.

    4.0.0release notes

  • The created_at datetime value is now timezone-aware.

    4.0.0release notes

  • PageIterator now starts on page 1.

    4.0.0release notes

  • Parser.parse_error is removed.

    4.0.0release notes

  • The method parameter was removed from parse methods on Parser and its subclasses.

    4.0.0release notes

  • Support for Python 2 is dropped.

    4.0.0release notes

  • Support for Python 3.5 is dropped.

    4.0.0release notes

  • The Relation model was removed.

    4.0.0release notes

  • StreamListener is merged into Stream. Stream data and event handlers now log by default and disregard return values.

    4.0.0release notes

  • Stream.auth was replaced with separate credential parameters and attributes: consumer_key, consumer_secret, access_token, and access_token_secret.

    4.0.0release notes

  • The Stream parameter proxies was replaced by proxy.

    4.0.0release notes

  • Stream reconnect-wait parameters and attributes were removed, including retry_time_start, retry_420_start, retry_time_cap, snooze_time_step, snooze_time_cap, retry_time, and snooze_time.

    4.0.0release notes

  • Exceptions raised in Stream._connect are no longer reraised.

    4.0.0release notes

  • The Stream.api attribute was removed.

    4.0.0release notes

  • The Stream.body attribute was removed.

    4.0.0release notes

  • Positional arguments are no longer accepted by Stream.filter.

    4.0.0release notes

  • The encoding parameter was removed from Stream.filter.

    4.0.0release notes

  • The is_async parameter was renamed to threaded.

    4.0.0release notes

  • Stream.firehose was removed.

    4.0.0release notes

  • The Stream.headers attribute was removed.

    4.0.0release notes

  • The Stream.host attribute was removed.

    4.0.0release notes

  • Stream.retry_count was renamed to Stream.max_retries.

    4.0.0release notes

  • The Stream.new_session attribute was removed.

    4.0.0release notes

  • Stream.retweet was removed.

    4.0.0release notes

  • Positional arguments are no longer accepted by Stream.sample.

    4.0.0release notes

  • The is_async parameter was renamed to threaded.

    4.0.0release notes

  • Stream.sitestream and Stream.userstream were removed.

    4.0.0release notes

  • The Stream.timeout attribute was removed.

    4.0.0release notes

  • The Stream.url attribute was removed.

    4.0.0release notes

  • Stream.sitestream and Stream.userstream were removed.

    4.0.0release notes

  • The stream can disconnect when any line of data is received, including keep-alive signals.

    4.0.0release notes

  • StreamListener was removed and merged into Stream; migrate callbacks to Stream, including renamed callbacks on_disconnect_message, on_request_error, and on_connection_error.

    4.0.0release notes

  • The on_direct_message and on_friends callbacks were removed along with userstream and sitestream support.

    4.0.0release notes

  • The on_event callback was removed.

    4.0.0release notes

  • TooManyRequests replaces RateLimitError.

    4.0.0release notes

  • TweepyException replaces TweepError.

    4.0.0release notes

  • Tweepy adds support for Twitter API v2 and replaces API v1.1 models in the package namespace.

    4.0.0release notes

New APIs and options 45

Behavior and default changes 8

  • All 2xx HTTP status codes are treated as successful responses.

    4.0.0release notes

  • Media uploading is reworked.

    4.0.0release notes

  • Defaults to models.Status more broadly for results when parsers or model factories lack the relevant attributes.

    4.0.0release notes

  • Defaults to models.User more broadly for the user attribute when parsers or model factories lack the relevant attributes.

    4.0.0release notes

  • models.User instances are now hashable.

    4.0.0release notes

  • Stream.sample now uses the GET HTTP method.

    4.0.0release notes

  • Stream now uses a specific user agent.

    4.0.0release notes

  • Streaming no longer depends on string-length delimitation.

    4.0.0release notes

Fixes and other changes 10