From fb6eb7d53d78bcaca997586f95270a43753a9ae6 Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 7 Jan 2022 07:18:13 -0600 Subject: [PATCH] Rename OAuthHandler to OAuth1UserHandler Keep OAuthHandler as deprecated alias --- tweepy/__init__.py | 4 ++-- tweepy/auth.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tweepy/__init__.py b/tweepy/__init__.py index 2740494..acdcbcb 100644 --- a/tweepy/__init__.py +++ b/tweepy/__init__.py @@ -11,8 +11,8 @@ __license__ = 'MIT' from tweepy.api import API from tweepy.auth import ( - AppAuthHandler, OAuthHandler, OAuth2AppHandler, OAuth2BearerHandler, - OAuth2UserHandler + AppAuthHandler, OAuthHandler, OAuth1UserHandler, OAuth2AppHandler, + OAuth2BearerHandler, OAuth2UserHandler ) from tweepy.cache import Cache, FileCache, MemoryCache from tweepy.client import Client, Response diff --git a/tweepy/auth.py b/tweepy/auth.py index 547b09e..37af86a 100644 --- a/tweepy/auth.py +++ b/tweepy/auth.py @@ -21,7 +21,7 @@ https://dev.twitter.com/discussions/21281""" log = logging.getLogger(__name__) -class OAuthHandler: +class OAuth1UserHandler: def __init__(self, consumer_key, consumer_secret, access_token=None, access_token_secret=None, callback=None): @@ -101,6 +101,8 @@ class OAuthHandler: except Exception as e: raise TweepyException(e) +OAuthHandler = OAuth1UserHandler + class OAuth2AppHandler: -- 2.25.1