체인지로그
이 체인지로그는 https://github.com/tweepy/tweepy/releases 에서 release note로도 확인이 가능합니다.
Version 4.11.0 (2022-10-24)
새 기능 / 개선
버그 수정
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_parametersargument inAPI.indicate_direct_message_typing(396ab84)Update
models.Listmethods to pass keyword arguments toAPImethods (#1987)Update
models.Listmethods to use list ID instead of slug (73f6308)
기타
Log text of HTTP response when handling request error in
AsyncBaseStream(51c3762)Update signature for
get_list_tweetsin documentation (86577b1)Add
media_fields,place_fields, andpoll_fieldsparameters
Add version changed directive to documentation for
get_list_tweets(5cb2616)Improve documentation for
wait_on_rate_limitparameter for streaming (#1986)Add sections for old and previously missing versions to changelog (6aa1b77)
Update cassettes for testing methods that return Tweet objects (872b33e)
Version 4.10.1 (2022-08-22)
버그 수정
Fix
AsyncBaseClientrate limit handling (#1902)Fix handling of
StreamRulewhen passed in list toStreamingClient.delete_rulesorAsyncStreamingClient.delete_rules(#1942)Add support for
media_fields,place_fields, andpoll_fieldsparameters forClient.get_list_tweetsandAsyncClient.get_list_tweets(#1931)Ignore
AsyncClientmethod parameters explicitly passed asNone(#1944)
Version 4.10.0 (2022-05-20)
새 기능 / 개선
Add asynchronous interfaces for Twitter API v2
Add support for reverse chronological home timeline with Twitter API v2 (#1900)
Add
Client.get_home_timelineandAsyncClient.get_home_timeline
Update the User-Agent header based on
AsyncStream.user_agenteven ifAsyncStream.sessionis already initialized/set (096a62c)
Twitter API Deprecations
기타
다양한 문서 갱신(업데이트) 및 수정
Version 4.9.0 (2022-05-05)
새 기능 / 개선
Twitter API Deprecations
Deprecate
Stream.sampleand note deprecation of compliance messages forStream.filter(#1876)
기타
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_requirefrom setup.py (2870031)Stop creating universal wheels (9d93ec8)
다양한 문서 갱신(업데이트) 및 수정
Version 4.8.0 (2022-03-24)
새 기능 / 개선
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
Clientmethods that require the authenticating user’s ID (0157d0b)Raise
TypeErrorfor those methods when the access token isn’t set
Raise
NotFoundrather thanHTTPExceptionwhen encountering 404 response status codes inBaseClient.request(b6b8219)
Version 4.7.0 (2022-03-17)
새 기능 / 개선
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)
버그 수정
기타
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)
Use dash instead of underscore for requests-oauthlib requirement (2c94758)
Optimize
Tweet.referenced_tweetsinitialization (3299881)문서를 갱신·개선함
Version 4.6.0 (2022-02-24)
This will be the last minor version to support Python 3.6 (#1788).
새 기능 / 개선
Add support for streaming with Twitter API v2 (86244c1)
Refactor
ClientandStreamto inherit from newBaseClientandBaseStreamclasses and addStreamingClient,StreamResponse, andStreamRule
Add support for new
max_resultsandpagination_tokenparameters forClient.get_liking_users(bdd6b55)Add support for new
max_resultsandpagination_tokenparameters forClient.get_retweeters(3479e56)Add support for new
sort_orderparameter forClient.search_all_tweets(bd202e5)Add support for new
sort_orderparameter forClient.search_recent_tweets(8b47170)Add
Client.get_space_tweets(c8d5d9a)Add
Space.subscriber_count(1ffc8cd)Use
reprof 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.sessionwithinStream.__init__(80adf5b)Update the user agent based on
Stream.user_agenteven ifStream.sessionis already initialized
Use oauthlib to create code challenge and verifier for PKCE (eb22416)
Version 4.5.0 (2022-01-24)
새 기능 / 개선
Revamp authentication interface
Add support for OAuth 2.0 Authorization Code Flow with PKCE
Rename
OAuthHandlertoOAuth1UserHandler(fb6eb7d)OAuthHandleris kept as a deprecated alias (cba7317)
Rename
AppAuthHandlertoOauth2AppHandler(529d793)AppAuthHandleris kept as a deprecated alias (d4ceb1a)
Rename
OAuth2BearertoOAuth2BearerHandler(0781fde)Allow passing access token and secret directly to
OAuth1UserHandler.__init__(99f3583)Note, this changes the
callbackparameter to be the fifth argument, positionally
Allow
OAuth2BearerHandlerto be used asauthparameter forAPI(5a2a3fc)Remove
AuthHandler(d600c4c)Remove
OAuth1UserHandler.get_xauth_access_token(8e2de9f)Update and improve authentication documentation (f9a722b)
Other improvements and optimizations
Add support for
Media.url(#1722)Use requests exception to handle
JSONDecodeError(b492b0a)Update requests dependency requirement to >= 2.27.0 (ed66e8e)
버그 수정
Version 4.3.0 (2021-11-03)
Version 4.1.0 (2021-10-07)
새 기능 / 개선
파이썬 3.10 지원 (229b738)
Tox 개발 최소 요구 버전을 3.14.0 으로 갱신함
이제 스페이스(트위터 스페이스)를 지원함 (5c68892)
추가함:
Space모델추가함:
Client.search_spaces,Client.get_spaces,Client.get_space
이제 〈표준 준수 하 일괄 처리〉(Batch compliance)를 지원함 (6ca75e1)
추가함:
Client.get_compliance_jobs,Client.get_compliance_job,Client.create_compliance_job
추가함:
Client.get_muted(00cdab8)자잘한 문서 수정
Version 4.0.1 (2021-10-01)
버그 수정
Client메서드에 필드값 형태로 문자열이 전달될 때 발생하던 문제를 수정함 (d61a5d9)이제 트위터 API 요청으로부터
Client메서드에 예기치 않은 매개변수가 전달되는 경우도 고려함 (618d1c2)이는 새 엔드포인트 매개변수를 대비하는 미래 지향형 업데이트임
Client메서드에 전달된 매개변수를 날짜/시간 형식에서 문자열로 변환할 때, 더 이상 매개변수 이름을 확인하지 않음 (1320a37)이는 날짜/시간 형식을 허용하는 새 엔드포인트 변수 지원에 대한 미래 지향형 업데이트임
simplejson 사용과 관련된,
HTTPException에서의JSONDecodeError문제를 수정함 (586c162)
Version 4.0.0 (2021-09-25)
새 주요 기능 / 개선
이제 트위터 API v2 를 지원함(#1472, #1535)
패키지 네임스페이스에서 API v1.1 모델을 대체함
API재작업bind_api과APIMethod를API.request로 대체함더 이상
API메서드에 데코레이터 속성(Decorator property)을 사용하지 않음이제
pagination데코레이터를 사용함
추가함:
requests.Session(API.session의 속성으로) (2f28757)이제 하나의
API인스턴스에 하나의requests.Session인스턴스를 초기화(Initialize)하며, 매 요청마다 초기화하지 않아도 됨
이제 API.request에 엔드포인트 매개변수가 아닌, 예기치 않은 키워드 인수가 전달되면 로그에 경고를 기록합니다. (c82d7ac)
허용된 매개변수(
allowed_param)를 엔드포인트 매개변수(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)
API.request와 다른API메서드를 개선·최적화·단순화함
스트리밍 재작업
StreamListenerhas been merged intoStream(see Backwards-Incompatible Changes section)Stream의 데이터 및 이벤트 처리 메서드가 (예:on_으로 시작하는 것들) 이제 기본적으로 로그에 기록되며, 반환값은 무시함kee-alive 신호를 포함한 모든 종류의 데이터를 수신했을 때, 스트림 연결을 종료할 수 있도록 허용함 (#773, #897)
Remove, rename, and replace attributes, methods, and parameters (see Backwards-Incompatible Changes section)
Stream을 개선·최적화·단순화함
문서 재작업
예외 재작업
Backwards-Incompatible Changes
API
API메서드와models메서드의 이름을 변경함API.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->API.get_place_trends(4912a7c)API.update_with_media->API.update_status_with_media(0a5e533)
API메서드 매개변수명을 변경함API.geo_id:id->place_id(78051e8)API.lookup_friendships:screen_names->screen_name(4573b35),user_ids->user_id(3bcccf8)API.lookup_statuses:id_->id(f13a34b)API.lookup_users:screen_names->screen_name(17a2e7c),user_ids->user_id(e7d9e55)API.search_30_day:environment_name->label(6c66c60)API.search_full_archive:environment_name->label(295bfe4)API.update_profile_image:file_->file(69f6c1d)
API메서드의 필수 매개변수API.closest_trends:lat,long(75b9616)API.create_favorite:id(d3d2abe)API.create_list:name(5e7385a)API.create_saved_search:query(c57a4be)API.delete_direct_message:id(bcb56ab)API.destroy_favorite:id(a9d41b6)API.get_direct_message:id(f5775ee)API.get_oembed:url(af0cc51)API.get_place_trends:id(c50f540)API.get_retweeter_ids:id(66f6704)API.get_status:id(bac73c3)API.reverse_geocode:lat,long(87d8646)API.search_30_day:query(52874b7)API.search_full_archive:query(801f15d)API.search_tweets:q(9377e7e)API.search_users:q(21802f9)API.update_status:status(f64c076)API.update_status_with_media:status(0726263)
API메서드가 더 이상 위치 인수(Positional argument)를 받지 않음 (키워드 인수 형식으로 전달해야 함)API.add_list_member(ae18ee5)API.add_list_members(8eb900f)API.available_trends(7a74863)API.closest_trends및lat,long(7946490)API.create_block(caa34c6)API.create_favorite및id(0b83984)API.create_friendship(82cd798)API.create_list및name(25cb01e)API.create_mute(4aae710)API.create_saved_search및query(76be2d9)API.delete_direct_message및id(53ca00f)API.destroy_block(c49cfb2)API.destroy_favorite및id(8afee87)API.destroy_friendship(b2d44fe)API.destroy_list(4b2cfc4)API.destroy_mute(009b54e)API.destroy_saved_search및id(b7afca2)API.destroy_status및id(876c8ca)API.geo_id및place_id(a0cff22)API.get_blocked_ids(ff38b70)API.get_blocks(dc81854)API.get_direct_message및id(4ae0ec8)API.get_direct_messages(8e0507d)API.get_favorites(e80b49a)API.get_follower_ids(7d42597)API.get_followers(c6ab5a0)API.get_friend_ids(c65641b)API.get_friends(e6965fa)API.get_friendship(6dea7de)API.get_list(92dc37f)API.get_list_member(0af06db)API.get_list_members(7c8be8d)API.get_list_memberships(ec7601f)API.get_list_subscriber(a175cdd)API.get_list_subscribers(3ee84ef)API.get_list_subscriptions(178d719)API.get_lists(3cd0058)API.get_muted_ids(2967104)API.get_mutes(9e9d370)API.get_oembed및url(d13d853)API.get_place_trends및id(548810c)API.get_retweeter_ids및id(9907c25)API.get_retweets및id(0bd0292)API.get_retweets_of_me(2b2ed0a)API.get_saved_search및id(1d3d3ae)API.get_saved_searches(c5f5b4b)API.get_settings(2c2f0ec)API.get_status및id(30af3ac)API.get_user(6b761ce)API.home_timeline(b91be22)API.incoming_friendships(6d3b7f2)API.list_timeline(e3ec5c1)API.lookup_friendships(0eff951)API.lookup_statuses및id(cf9845d)API.lookup_users(7317109)API.media_upload및filename(ec2498f)API.mentions_timeline(3614ce4)API.outgoing_friendships(09f8504)API.rate_limit_status(b4b91c1)API.remove_list_member(e7fa800)API.remove_list_members(593ef1c)API.report_spam(f55efcf)API.retweet및id(4f7be88)API.reverse_geocode및lat,long(b209c48)API.search_30_day및label,query(434fd35)API.search_full_archive및label,query(44391bc)API.search_geo(0a6bec9)API.search_tweets및q(445da4e)API.search_users, besidesq(76ca416)API.send_direct_message및recipient_idandtext(7d1a549)API.set_settings(bf1d928)API.supported_languages(2034efc)API.subscribe_list(ee3b718)API.unretweet및id(4626c42)API.unsubscribe_list(2df2311)API.update_list(8b3b4fb)API.update_profile(99cd815)API.update_profile_banner및filename(1ca22be)API.update_profile_image및filename(3539fa2)API.update_status및status(761cbfe)API.update_status_with_media및filename,status(0ac4e83)API.user_timeline(0ef964f)
API.update_status_with_media매개변수 재정렬 (87abdcd)다음
API초기화 파라미터 이름 변경:auth_handler->auth(ee313bd)API초기화에서의auth에서 위치 인수(Positional argument)를 더 이상 허용하지 않음(da2f276)제거함:
API.api_root,API.upload_root(e757919)제거함:
API.compression(4590c7a)제거함:
API.me,AuthHandler.get_username,OAuthHandler.get_username(807f937)제거함:
API.search_host,API.search_root(92db0cf)제거함:
API.wait_on_rate_limit_notify(f325738)이제 트위터 API 호출에 도달할 때 경고를 로그에 항상 기록함
제거함:
API.lookup_statuses키워드 인수(0a404c3)
Stream
StreamListener를 제거하고,Stream에 해당 기능들을 병합(Merge)함 (39abff4)StreamListener.keep_alive->Stream.on_keep_alive(abf4d5d)StreamListener.on_connect->Stream.on_connectStreamListener.on_data->Stream.on_dataStreamListener.on_delete->Stream.on_deleteStreamListener.on_disconnect->Stream.on_disconnect_message(6c3b997)StreamListener.on_error->Stream.on_request_error(fe3bb8b)StreamListener.on_exception->Stream.on_exceptionStreamListener.on_limit->Stream.on_limitStreamListener.on_scrub_geo->Stream.on_scrub_geoStreamListener.on_status->Stream.on_statusStreamListener.on_status_withheld->Stream.on_status_withheldStreamListener.on_timeout->Stream.on_connection_error(8f62297)StreamListener.on_user_withheld->Stream.on_user_withheldStreamListener.on_warning->Stream.on_warning
제거함:
Stream.api(21a9db2)제거함:
Stream.body(3e40193)제거함:
Stream.headers(d07af4e)제거함:
Stream.host(9cf8518)제거함:
Stream.new_session(26518ab)제거함:
Stream.timeout(a2f79f1)제거함:
Stream.url(48cbf97)제거함: 재연결 관련 스트림 매개변수 및 속성값 (24059d4)
제거함:
Stream.retry_time_start,Stream.retry_420_start,Stream.retry_time_cap,Stream.snooze_time_step,Stream.snooze_time_cap,Stream.retry_time,Stream.snooze_time
Stream.retry_count를Stream.max_retries으로 이름 변경함 (3585f13)Stream.auth를 자격증명 관련 매개변수 및 속성으로 대체함 (c9f59e6)Stream.auth를Stream.consumer_key,Stream.consumer_secret,Stream.access_token,Stream.access_token_secret로 대체하였음
Stream의 매개변수인proxies를proxy로 대체함 (#1272)제거함:
Stream.filter의 매개변수인encoding(b3f2db2)Stream.filter과Stream.sample의 매개변수인is_async를threaded로 이름 변경함 (6c96c15)더 이상
Stream.filter가 위치 인수(Positional argument)를 허용하지 않음 (0629d5f)더 이상
Stream.sample이 위치 인수(Positional argument)를 허용하지 않음 (b170720)
Twitter API Backwards-Incompatible Changes
제거함:
API.configuration(#1614)제거함:
API.geo_similar_places(c6cfd97)제거함:
API.related_results(068273b)제거함:
Relationmodel (cc4479a)
제거함:
API.create_block의 엔드포인트 매개변수인id(e4eaa4b)제거함:
API.create_friendship의 엔드포인트 매개변수인id(6a3c1ab)제거함:
API.create_mute의 엔드포인트 매개변수인id(bb25d69)제거함:
API.destroy_block의 엔드포인트 매개변수인id(1a9b52d)제거함:
API.destroy_friendship의 엔드포인트 매개변수인id(66f1612)제거함:
API.destroy_mute의 엔드포인트 매개변수인id(8c444c5)제거함:
API.get_follower_ids의 엔드포인트 매개변수인id(5cddd12)제거함:
API.get_followers의 엔드포인트 매개변수인id(a3fb959)제거함:
API.get_friend_ids의 엔드포인트 매개변수인id(7cbf818)제거함:
API.get_friends의 엔드포인트 매개변수인id(6875e15)제거함:
API.get_user의 엔드포인트 매개변수인id(a2681ed)제거함:
API.search_geo의 엔드포인트 매개변수인accuracy,contained_within(d37a409)제거함:
API.set_settings의 엔드포인트 매개변수인allow_contributor_request(1cc33b2)API.update_profile_banner의 다음 엔드포인트 매개변수를 갱신함:offset_right->offset_top(83f9b79)제거함:
API.update_status의 매개변수인enable_dmcommands, `fail_dmcommands(fe5b3ef)제거함:
API.update_status_with_media의 엔드포인트 매개변수인in_reply_to_status_id_str,auto_populate_reply_metadata(c3c9d29)제거함:
API.user_timeline의 엔드포인트 매개변수인id(#1484)제거함:
Stream.firehose(ad50cdc)제거함:
Stream.retweet(6b1944b)제거함:
Stream.sitestream,Stream.userstream(96f7e63)
기타
이제
models.List.created_at,models.SavedSearch.created_at,models.Status.created_at,models.User.created_at가 Datetime 객체를 인식함(59d4d92)JSONParser.parse과ModelParser.parse의 매개변수인return_cursors를 키워드 인자로만 전달할 수 있도록 변경함 (56b8e31)제거함:
parse메서드에서,Parser의 매개변수인method및 서브클래스(dda2ec6)더 이상
API.verify_credentials가 HTTP 401 코드를 처리하지 못함 (7e4d2a4)제거함:
models.List.is_member,models.List.is_subscribed(b765aee)
새 기능 / 개선
새 메서드 및 매개변수 / 속성(Attribute)
추가함:
API.get_list_ownerships(#1282, #1498)추가함:
models.User.list_ownerships(#1282)
추가함:
API.get_profile_banner(58ac8bb)추가함:
API.no_retweets_friendships(496a399)추가함:
API.remove_profile_banner(f0e53c6)추가함:
API.update_friendship(ddd24a4)추가함:
API.user_agent(bbec64b)API메서드에 다음 엔드포인트 매개변수를 추가함API.create_block:include_entities,skip_status(5e694b2)API.create_favorite:include_entities(65c7ce7)API.destroy_block:include_entities,skip_status(7299362)API.destroy_favorite:include_entities(ecd19f0)API.destroy_status:trim_user(ed363e6)API.get_blocked_ids:stringify_ids(316b4cc)API.get_blocks:include_entities,skip_status(7ef1e85)API.get_favorites:include_entities(2b91edc)API.get_follower_ids:stringify_ids(c490027)API.get_friend_ids:stringify_ids,count(aba327e)API.get_list_member:include_entities,skip_status(e959787)API.get_list_members:count,include_entities,skip_status(232fa29)API.get_list_subscriber:include_entities,skip_status(783941a)API.get_muted_ids:stringify_ids(8b04108)API.get_retweeter_ids:count(71ca488)API.get_retweets:trim_user(e377188)API.get_retweets_of_me:trim_user,include_entities,include_user_entities(589d97d)API.get_user:include_entities(485691d)API.incoming_friendships:stringify_ids(ffb7c0e)API.media_upload:media_category,additional_owners(#1486)API.mentions_timeline:trim_user,include_entities(eb7c8f6)API.outgoing_friendships:stringify_ids(7ed0762)API.retweet:trim_user(70d9665)API.search_users:include_entities(8d64b61)API.unretweet:trim_user(6d93f3b)API.update_profile:include_entities,skip_status(9715c4a)
추가함:
Stream.on_disconnect메서드 (#277)Stream.thread를 드러냄(Expose)(9c2419d)
새 기능
특정 메서드를 문서화함
종속성(Dependencies) 관련
기타
이제
OAuthHandler초기화 시 Consumer Key값과 Secret 값의 자료형을 확인함 (#1489)models.User를 해시화할 수 있게(Hashable) 함 (#1306)API요청 제한을 처리하기 위해 두었던 약간의 대기 시간을 줄임 (#1049)이제
API.update_profile_image가 키워드 인자도 정상적으로 받을 수 있음 (ab96f2f)이제
API.update_profile_banner가 키워드 인자도 정상적으로 받을 수 있음 (88c3fa1)이제 모든 200번대 HTTP 상태 코드를 성공적 응답으로 취급함 (a0f6984)
이제 스트리밍이 gevent를 지원함 (#651)
스레드화된(Threaded)
Stream.filter와Stream.sample이 이제 스레드를 반환함 (2e957b6)이제
Stream이 특정 유저 에이전트를 사용함 (5994c4b)
기타
다양한 문서 갱신(업데이트) 및 수정
기타 다양한 최적화 및 개선
버그 수정
제거함:
Stream에서의 문자열 길이 한계에 대한 종속성 (#892)이제
Stream._connect에서 예외를 또 발생시키지 않음 (#1072)Stream.sample메서드가 GET HTTP 메서드를 이용하도록 변경함 (1b0e869)models.Status.parse의models.User모델이model_factory없이user로, 또는user없이 Model factory들을 이용해 파서(Parser)를 더 광범위하게(more broadly) 처리할 수 있도록 바뀌었음 (#538)models.SearchResults.parse의models.Status모델이model_factory없이, 또는status없이 Model factory들을 이용해 파서(Parser)의 결과를 더 광범위하게(more broadly) 받을 수 있도록 바뀌었음 (71c031b)이제
PageIterator가 1페이지부터 시작함(기존 0페이지에서 변경됨). (#958)API.search_users에서 페이지가 복사되던 트위터 API 관련 문제를 해결함 (#958, #1465)이제 스트리밍에서
ChunkedEncodingError를 처리할 수 있음 (e8fcc4d)이제 HTTP 성공 상태 코드에서 발생하던 트위터 API 에러를 처리할 수 있음 (#1427)
이제
Cursor반복자가 음수나 0이 되던 문제를 처리할 수 있음 (c1457b7)
Version 3.10.0 (2020-12-25)
이 버전이 Python 2.7과 Python 3.5를 마지막으로 지원하는 버전임 (#1253) tweepy의 다음 버전은 4.0.0이 됨
새 기능 / 개선
추가함:
API.search_30_day,API.search_full_archive(#1175, #1294)API.home_timeline에 허용되는 매개변수를 갱신함(#1410, #1458)추가함:
trim_user,exclude_replies,include_entities제거함:
page(잘못 문서화된 매개변수)count가 첫 매개변수가 되도록 순서를 바꿈
API.get_oembed에 허용되는 매개변수를 갱신함추가함:
hide_thread,theme,link_color,widget_type,dnt제거함:
id
제거함:
API.update_profile_background_image(#1466)이제 Python 3.9를 지원함
코드 테스트 및 릴리즈에 쓰이던 것을 Travis CI에서, GitHub Actions로 변경함 (#1402)
문서를 갱신·개선함
버그 수정
이제
mimetypes.guess_type를 폴백 함수로서 이미지 파일 형식을 찾아내는데 사용함 (#1411)이제 업로드된 이미지에, 컨텐츠 종류에 적절한 적절한 MIME 타입을 사용함
API.update_profile_banner,API.update_profile_image,API.update_with_media에file매개변수를 재사용하도록 허용함 (#1475)이제
User.lists,User.lists_memberships,User.lists_subscriptions가 현재 인증된 사용자 대신 지정한 사용자에 대한 정보를 가져옴 (#1443, #1444)
Version 3.9.0 (2020-07-11)
새 기능 / 개선
추가함:
API.create_media_metadata(#716)API.update_status에 허용되는 매개변수를 갱신함(#1101)추가함:
exclude_reply_user_ids,attachment_url,possibly_sensitive,trim_user,enable_dmcommands,fail_dmcommands,card_uri제거함:
in_reply_to_status_id_str,source
API.get_status에 다음 매개변수를 추가함trim_user,include_my_retweet,include_entities,include_ext_alt_text,include_card_uri
API.statuses_lookup에 다음 매개변수를 추가함include_ext_alt_text,include_card_uri
개선함:
API.lookup_users(#706)API.statuses_lookup,API.create_media_metadata,API.update_status를 개선 및 최적화함API.lists_all에 다음 매개변수를 추가함:reverseAPI.lists_memberships에 다음 매개변수를 추가함:countAPI.lists_subscriptions에 다음 매개변수를 추가함:countAPI.list_timeline에 다음 매개변수를 추가함:include_entitiesAPI.list_subscribers에 다음 매개변수를 추가함count,include_entities,skip_status
이제 Python 3.8을 지원함
setup.py를 갱신·개선함
이제 PySocks을 직접 사용하는 대신, Request socks extra를 대신 사용함
이제 WebP 이미지 업로드를 지원함 (#1298)
Relationship모델에 누락됐던 속성들을 추가함 (#1375)DirectMessage모델에_json속성을 추가함 (#1342)테스트(tests) 갱신·개선 (#1217)
확장 트윗(Extended Tweets)에 대한 문서를 추가함
API.lookup_users문서 (#539)추가함: Running Tests 문서 (#681)
추가함: 문서의 한국어 번역본 (#1296)
추가함: 문서의 폴란드어 번역본 (#1316)
API.lookup_friendships문서 (#1375)문서를 갱신·개선함
Version 3.8.0 (2019-07-14)
새 기능 / 개선
이제 스트림이 데몬 스레드를 사용할 수 있음 (#1126)
제거함:
API.set_delivery_device(#1203)이제 simplejson을 더 이상 사용하지 않음 (import도 제거됨) (#832)
이제
API.blocks_ids와API.mutes_ids가 다음 매개변수를 허용함:cursor(#1208)이제 더 이상 Python 3.4를 지원하지 않음
이제
API.report_spam이 다음 매개변수를 허용함:perform_block(#1090)이제
API.friends가 다음 매개변수를 허용함:count(#577)API.search허용 매개변수 목록에서 다음을 제거함:since,from,to,source이제 스트림이 위치 삭제 및 보류된 컨텐츠 통지와 관련한 처리가 가능함 (#886)
이제
User객체에 〈같음〉 과 〈같지 않음〉 비교 연산자를 사용할 수 있음 (#939)Category,Friendship,List모델에 다음 속성을 추가함:_json(#590, #1169)제거함:
API.suggested_categories,API.suggested_users,API.suggested_users_tweets테스트(Tests) 및 카세트(Cassettes)를 갱신·개선함 (#1242)
API.direct_messages와API.sent_direct_messages를API.list_direct_messages로 대체함 (#1081, #1228)갱신함:
API.get_direct_message,API.send_direct_message,API.destroy_direct_message(#1081, #1228)문서를 갱신·개선함
Version 3.7.0 (2018-11-27)
Version 3.6.0 (2015-03-02)
새 기능 / 개선
Status.quoted_status를Status객체로 취급·파싱함 (#633)in_reply_to_status_id_str를API.update_status와API.update_with_media의 매개변수로서 허용함 (#693)Stream.sample에 추가함: 매개변수stall_warnings(#701)auto_populate_reply_metadata를API.update_status와API.update_with_media의 매개변수로서 허용함 (#761)profile_link_color를API.update_profile의 매개변수로서 허용함
Version 3.5.0 (2015-11-19)
기능 / 개선
쪽지를 받을 때 〈full_text〉 매개변수를 허용함 (#664)
파싱 에러가 발생했을 경우 명시적
더 이상 사용되지 않는 코드를 제거하고, 코드를 정리함 (#583)
버그 수정
update_status: 첫 위치 인수(Positional argument)는 반드시 트윗(Status)여야 함 (#578)
다음 오류를 수정함: 《TypeError: Can’t convert 〈bytes〉 object to str implicitly》(#615, #658, #635)
auth.py 에서의 중복 선언(raise)를 수정함
Version 3.4.0 (2015-08-13)
새 기능
추가함: 계정 및 설정 관련 API (PR #596)
트위터 API 요청 제한을 쉽게 처리할 수 있게끔 RateLimitError를 추가함 (문제 #600, PR #611)
verify_credentials API에 include_email 매개변수를 허용함 (PR #623)
추가함: 스트리밍 API에서의 《filter_level》 매개변수 지원 (PR #619)
버그 수정
스트리밍: 스트림 바이트를 json.decode 이전에 디코딩하려 시도하지 않음 (PR #606)
_add_list_members 와 _remove_list_members 속성에 있던 오타를 수정함 (PR #593)
문제 #570 수정 - 예외 발생 시의 《exception》 추가함
streaming.py 에서의 예외 발생 관련 수정 (PR #621)
Version 3.3.0 (2015-02-21)
Requests 요구사항을 완화함 (버전 2.4.3 이상)
Python 3에서 스트림이 프리징되던 문제 수정 (문제 #556)
StreamListener에 추가함: keep_alive 메세지가 도착할 때 호출되는 keep_alive() 콜백 함수
재연결 시 스트림 세션 헤더가 사용되지 않던 문제 수정
연결이 비정상적으로 종료된 경우 스트림이 무한루프에 빠지던 문제를 수정함 (PR #561)
Version 3.2.0 (2015-01-28)
제거함: 더 이상 사용되지 않는 트렌드 관련 메서드
tweepy.debug() 가 Python 3에서도 동작하도록 수정함
StreamListener 언어 필터가 작동을 중지하는 문제를 수정함 (Issue #529)
추가함: 스트리밍 문서
추가함: 미디어 업로드 엔드포인트
update_status() 에 추가함: media_ids 매개변수
Version 3.1.0 (2014-12-01)
이제 스트리밍 클라이언트에 대한 자체 SSL 인증서 지정을 허용함
이제 Python Wheels를 이용해 배포함.
특정 속성값을 기본 메서드(Underlying method)에 전달하는 것과 관련된 커서 호출 수정. (https://github.com/tweepy/tweepy/issues/515)
Request를 2.4.3으로 판올림함
Version 3.0 (2014-11-30)
추가함: 다수의 리스트 멤버 관련 API 메서드 (add_list_members, remove_list_members).
추가함: sitestream 엔드포인트
httplib 대신 Requests를 이용하도록 변경함
제거함: 보안 연결이 아닌 HTTP에 대한 모든 지원
이제 프록시를 지원함
/statuses/lookup.json 에 추가함: API 메서드
followers_ids 에 추가함: 〈count〉 매개변수
update_profile_image 에 추가함: allowed_param
트윗(Status) 간 비교
on_data 메서드에 경고 메세지 처리 조건을 포함·확장하였으며, 경고 메세지를 관리하는 메서드를 새로 정의함
파이썬 3 지원 향상
Version 2.3.0 (2014-04-26)
Version 2.2 (2014-01-20)
추가함: update_profile_banner 엔드포인트
200번대 HTTP 상태 코드를 더 이상 에러로 취급하지 않음
더 이상 egg 릴리즈에 테스트가 패키징되지 않음
테스트 안정성 향상, 풀 리퀘스트에서 CI 테스트가 가능하도록 함
제거함: 기본 인증(Basic Auth)
앱엔진(Appengine)을 수정하기 위해 httplib의 내장 타임아웃 기능 사용
추가함: retweeters() 엔드포인트
더 이상 사용되지 않는 retweeted_by 와 retweeted_by_ids 를 제거함
날짜 및 시간 파싱 기능 향상. 스레드에서 기존보다 더 안정적임
코드 커버리지 보고 활성화됨. Coveralls에 보고서를 업로드 해주세요.
https://coveralls.io/r/tweepy/tweepy
더 이상 사용되지 않는 test() 엔드포인트가 제거함
on_disconnect() 에 새 스트림 리스너를 추가함. 연결 종료 전에 트위터에서 《disconnect》 메세지가 도착할 때마다 호출됨.
https://dev.twitter.com/docs/streaming-apis/messages#Disconnect_messages_disconnect
HTTPS를 기본으로 사용하게 설정함
커서 시작 위치 설정 지원 (예: Cursor(api.friends_ids, cursor=123456))
캐시된 결과가 반환될 때, 《True》인 API.cached_result 인스턴스 플래그가 추가함
새 스트리밍 클라이언트 콜백이 추가함
on_event(status): 새 이벤트가 발생하면 호출됨.
on_direct_message(status): 새 쪽지가 도착하면 호출됨.
스트리밍 클리아언트 재연결 동작 및 구성의 개선 (https://github.com/tweepy/tweepy/commit/447f69cd3de67b0d241b9d4f669ecc9b9c0cdb54)
Version 2.1 (2013-06-16)
추가함: get_oembed()
friends() 와 followers() 가 다시 생겼으며, v1.1로 갱신됨
report_spam() 엔드포인트 수정
스트리밍 filter() 메서드에 《languages》 매개변수 추가.
API에 《timeout》 지원 추가. 예: API(timeout=1000)
파이썬 2.5 지원 중단
압축 지원 추가. 예: API(compression=True)
StreamListener에 on_connect() 콜백 추가
API의 search() v1.1의 엔드포인트로 전환. 이 외에도 다른 변화가 있었음.
《page》(페이지) 기반 커서를 《ID》 기반 커서로 대체함
Version 2.0 (2013-02-10)
에런 스워츠(Aaron Swartz)를 추모하며
트위터 API 1.1 지원
기본 인증방식(Basic Authentication)이 더 이상 사용되지 않음.
제거함: friends_timeline()
mentions() 이 제거되고, mentions_timeline() 로 변경됨
제거함: retweeted_by_user()
제거함: retweeted_by_me()
제거함: retweeted_to_me()
제거함: retweeted_by_user()
제거함: friends()
제거함: followers()
제거함: enable_notifications()
제거함: disable_notifications()
제거함: exists_block()
lists() 가 제거되고, lists_all() 로 변경됨
제거함: is_list_member()
추가함: show_list_member
제거함: is_subscribed_list()
추가함: show_list_subscriber()
제거함: trends_location()
제거함: nearby_places(
Version 1.13 (2013-01-17)
Version 1.12 (2012-11-08)
Version 1.11 (2012-08-14)
Version 1.10 (2012-07-08)
Version 1.9 (2012-03-17)
Version 1.8 (2011-10-31)
Version 1.7.1 (2010-05-25)
Version 1.7 (2010-05-23)
Version 1.6 (2010-03-18)
Version 1.5 (2010-01-12)
Models
Added some new helper methods to List model
User model
Added lists_memberships, lists_subscriptions, and lists helpers
Added followers_ids helper
Added ModelFactory to replace 〈models〉 dict in tweepy.models. Extend this factory to plugin customized models then pass into API().
API
lists(), lists_memberships(), and lists_subscriptions() now take an 《user》 parameter for specifying which user to query.
OAuthHandler
You may now pass in an optional 〈secure〉 boolean to the constructor which will use https for OAuth requests. Ex: auth = OAuthHandler(token,secret,secure=True)
Fallback to using 〈twitter.com〉 instead of 〈api.twitter.com〉 for OAuth until issue #8 is resolved.
Version 1.4 (2009-12-10)
Added people search API method. API.search_users()
Streaming API
Moved parameters into POST body to prevent 《head too big》 errors.
Stream can be run either asynchronously (threaded) or synchronously (blocks main thread). By default Stream will run in sync. mode. To change this pass into the stream method 〈async=True〉. Example: s = Stream(〈test〉, 〈password〉, MyListener()) s.sample(async=True) # threaded mode s.filter(track=[〈pizza〉]) # synch./blocking mode
Listener now has a 《on_data》 method which can be overridden to manually handle the raw stream data.
tweepyshell
allow using getpass for more secure password collection new usage: tweepyshell
[password] <– optional now enable debug mode with 〈-d〉 flag
API
retweet() method now works correctly
Added local trends method: trends_available() and trends_location()
send_direct_message() now accepts either a user/screen_name/user_id for recipient of DM
update_status() added 〈source〉 parameter for Identi.ca
create_list() and update_list() added 〈description〉 parameter
tweepy.debug() enables httplib debug mode
New Sphinx documentation (Thanks Kumar!) in doc/
User model
Fix timeline() to return correct timeline
Remove mentions() method
Version 1.3 (2009-11-13)
Lists API methods added
API.verify_credentials() now returns an User object if credentials are valid. Otherwise false will be returned.
API.new() removed
Removed model validation. Prone to breakage due to API changes.
Moved documentation out of api.py and into wiki.
Removed 〈email〉 parameter from API.update_profile. No longer supported.
API.auth_handler -> API.auth
Moved memcache implementation to tweepy-more repository.
Tweepy now uses the versioned API and the new api.twitter.com subdomain
Updated retweet parsing for new payload format
Version 1.2 (2009-10-16)
API
Added automatic request re-try feature Example: API.friends(retry_count=5, retry_delay=10) Retry up to 5 times with a delay of 10 seconds between each attempt. See tutorial/t4.py for more an example.
Added cursor parameter to API.friends and API.followers methods. Note: page parameter is being deprecated by twitter on 10/26
Update parsing to handle cursor responses. When using 〈cursor〉 parameter, the API method will return a tuple with this format: (data, next_cursor, prev_cursor) Calls not using the 〈cursor〉 parameter are not changed in the way they return.
API.friends_ids and API.followers_ids now return a list of integers. Parser updated to handle cursor responses. See above.
Fix Status.source_url parsing
Fix search result 〈source〉 parsing to properly unescape html and extract source
Added report_spam method
Cursor Added the Cursor object to help with pagination within the API. Please see the pagination tutorial for more details (tutorial/t6). This is the recommended way for using the 〈page〉 and 〈cursor〉 parameters.
Models
Status: added retweet, favorite and retweets methods (NOTE: retweet API not live yet on twitter)
Python 2.4 support
Update OAuth bundled library.
Logging removed. Having our own mini-logging system just feels like overkill. Turns out it was not really needed that much. Simply just exposing the last HTTPResponse object should be good enough for most debugging.
Version 1.1 (2009-09-24)
Fixes
Google App Engine fixes (thanks Thomas Bohmbach, Jr)
API
Added Retweet API methods
Added Retweet Streaming method
New model: Retweet
Updated statuses parser to handle retweet_details
Added new parameters for statuses/update; lat & long
friends_ids() & followers_ids() parameter changed page -> cursor
search() added 《locale》 parameter
expose last httplib.HTTPResponse object received as API.last_response
OAuthHandler
Added set_request_token() method
Added support for 《sign in with twitter》. get_authorization_url() now takes a boolean that when true uses the 《sign in with twitter》 flow. See http://apiwiki.twitter.com/Sign-in-with-Twitter
Logging
Added TweepyLogger interface which allows applications to collect log messages from Tweepy for debugging purposes.
Dummy, console, and file loggers available
Examples
Appengine demo (oauth)
Documentation of each method in api.py
Version 1.0.1 (2009-09-13)
Status.user –> Status.author
User:
follow()
unfollow()
API:
init() signature change; no longer accepts 〈username〉 parameter which is now autodetected.
added new() method. shortcut for setting up new API instances example: API.new(auth=〉basic〉, username=〉testuser〉, password=〉testpass〉)
update_profile_image() and update_profile_background_image() method added.
Added search API methods: trends, trends_current, trends_daily, and trends_weekly
Streaming:
Update to new streaming API methods
New StreamListener class replacing callback function
Fixes
User.following is now set to False instead of None when user is not followed.
python 2.5 import syntax error fixed
python 2.5 timeout support for streaming API
win32 failed import of fcntl in cache.py
Changed indents from 2 to 4 spaces
Version 1.0 (2009-08-13)
https://github.com/tweepy/tweepy/commits/e62f8c18977fd755c9d24a0abebd3b8087c75b45