From cba7317a4aa298a65eda7825589eb40a01a370f6 Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 7 Jan 2022 07:51:36 -0600 Subject: [PATCH] Deprecate OAuthHandler alias --- tweepy/auth.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tweepy/auth.py b/tweepy/auth.py index 276b565..120e28f 100644 --- a/tweepy/auth.py +++ b/tweepy/auth.py @@ -102,7 +102,22 @@ class OAuth1UserHandler: except Exception as e: raise TweepyException(e) -OAuthHandler = OAuth1UserHandler + +class OAuthHandler(OAuth1UserHandler): + """Alias for :class:`OAuth1UserHandler` + + .. deprecated:: 4.5 + Use :class:`OAuth1UserHandler` instead. + """ + + def __init__(self, consumer_key, consumer_secret, access_token=None, + access_token_secret=None, callback=None): + warnings.warn( + "OAuthHandler is deprecated; use OAuth1UserHandler instead.", + DeprecationWarning + ) + super().__init__(consumer_key, consumer_secret, access_token, + access_token_secret, callback) class OAuth2AppHandler: -- 2.25.1