From: Harmon Date: Fri, 7 Jan 2022 11:06:47 +0000 (-0600) Subject: Rename AppAuthHandler to Oauth2AppHandler X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=529d7936201f05f4167225be3bbcaf38eafadb8c;p=tweepy.git Rename AppAuthHandler to Oauth2AppHandler Keep AppAuthHandler as deprecated alias --- diff --git a/tweepy/__init__.py b/tweepy/__init__.py index 6db021d..3747b1b 100644 --- a/tweepy/__init__.py +++ b/tweepy/__init__.py @@ -10,7 +10,9 @@ __author__ = 'Joshua Roesslein' __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 diff --git a/tweepy/auth.py b/tweepy/auth.py index 3f92dd1..d8b30ac 100644 --- a/tweepy/auth.py +++ b/tweepy/auth.py @@ -173,7 +173,7 @@ class OAuth2Bearer(AuthBase): return request -class AppAuthHandler(AuthHandler): +class OAuth2AppHandler(AuthHandler): """Application-only authentication handler""" OAUTH_HOST = 'api.twitter.com' @@ -200,3 +200,5 @@ class AppAuthHandler(AuthHandler): def apply_auth(self): return OAuth2Bearer(self._bearer_token) + +AppAuthHandler = OAuth2AppHandler