]> projects.mako.cc - twitter-api-cdsw/blob - requests_oauthlib/__init__.py
reverted the encoding fix that tommy made in lieu of a different crazy hack
[twitter-api-cdsw] / requests_oauthlib / __init__.py
1 from .oauth1_auth import OAuth1
2 from .oauth1_session import OAuth1Session
3 from .oauth2_auth import OAuth2
4 from .oauth2_session import OAuth2Session, TokenUpdated
5
6 __version__ = '0.4.2'
7
8 import requests
9 if requests.__version__ < '2.0.0':
10     msg = ('You are using requests version %s, which is older than '
11            'requests-oauthlib expects, please upgrade to 2.0.0 or later.')
12     raise Warning(msg % requests.__version__)
13
14 import logging
15 try:  # Python 2.7+
16     from logging import NullHandler
17 except ImportError:
18    class NullHandler(logging.Handler):
19        def emit(self, record):
20            pass
21
22 logging.getLogger('requests_oauthlib').addHandler(NullHandler())

Benjamin Mako Hill || Want to submit a patch?