From: Ryan Barrett Date: Wed, 13 Aug 2014 00:30:03 +0000 (-0700) Subject: log warning about Twitter API bug: signin_with_twitter and access_type don't play... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=42c64b59453e605b745313254686166a9ee1e2d9;p=tweepy.git log warning about Twitter API bug: signin_with_twitter and access_type don't play nice together sigh. background: https://dev.twitter.com/discussions/21281 @Aaron1011, i'm open to doing something stronger about this if you want, e.g. don't allow them both at the same time, or silently disable signin_with_twitter if access_type is set (which isn't as nice). --- diff --git a/tweepy/auth.py b/tweepy/auth.py index e18b71e..4ed5900 100644 --- a/tweepy/auth.py +++ b/tweepy/auth.py @@ -2,6 +2,7 @@ from urllib2 import Request, urlopen import urllib import base64 import json +import logging from tweepy.error import TweepError from tweepy.api import API @@ -65,6 +66,11 @@ class OAuthHandler(AuthHandler): try: if signin_with_twitter: url = self._get_oauth_url('authenticate') + if access_type: + logging.warning( + "Warning! Due to a Twitter API bug, signin_with_twitter " + "and access_type don't always play nice together. Details: " + "https://dev.twitter.com/discussions/21281") else: url = self._get_oauth_url('authorize') self.request_token = self._get_request_token(access_type=access_type)