Skip to content

Commit

Permalink
Rename AppAuthHandler to Oauth2AppHandler
Browse files Browse the repository at this point in the history
Keep AppAuthHandler as deprecated alias
  • Loading branch information
Harmon758 committed Jan 7, 2022
1 parent f7f15e6 commit 529d793
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tweepy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
__license__ = 'MIT'

from tweepy.api import API
from tweepy.auth import AppAuthHandler, OAuthHandler, OAuth2Handler
from tweepy.auth import (
AppAuthHandler, OAuthHandler, OAuth2AppHandler, OAuth2Handler
)
from tweepy.cache import Cache, FileCache, MemoryCache
from tweepy.client import Client, Response
from tweepy.cursor import Cursor
Expand Down
4 changes: 3 additions & 1 deletion tweepy/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def __call__(self, request):
return request


class AppAuthHandler(AuthHandler):
class OAuth2AppHandler(AuthHandler):
"""Application-only authentication handler"""

OAUTH_HOST = 'api.twitter.com'
Expand All @@ -200,3 +200,5 @@ def _get_oauth_url(self, endpoint):

def apply_auth(self):
return OAuth2Bearer(self._bearer_token)

AppAuthHandler = OAuth2AppHandler

0 comments on commit 529d793

Please sign in to comment.