diff options
author | k clair <kclair@riseup.net> | 2012-10-09 13:14:36 -0700 |
---|---|---|
committer | k clair <kclair@riseup.net> | 2012-10-09 13:14:36 -0700 |
commit | 568720334aa630ea504b2ce3b8c324f0a557d6e6 (patch) | |
tree | 81b7a7f273da3fc0d431ddb354264e8287f5ccc0 /requests-0.14.0/requests/_oauth.py |
add source files from upstream
Diffstat (limited to 'requests-0.14.0/requests/_oauth.py')
-rw-r--r-- | requests-0.14.0/requests/_oauth.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/requests-0.14.0/requests/_oauth.py b/requests-0.14.0/requests/_oauth.py new file mode 100644 index 0000000..165e937 --- /dev/null +++ b/requests-0.14.0/requests/_oauth.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- + +""" +requests._oauth +~~~~~~~~~~~~~~~ + +This module contains the path hack necessary for oauthlib to be vendored into +requests while allowing upstream changes. +""" + +import os +import sys + +try: + from oauthlib.oauth1 import rfc5849 + from oauthlib.common import extract_params + from oauthlib.oauth1.rfc5849 import (Client, SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER) +except ImportError: + directory = os.path.dirname(__file__) + path = os.path.join(directory, 'packages') + sys.path.insert(0, path) + from oauthlib.oauth1 import rfc5849 + from oauthlib.common import extract_params + from oauthlib.oauth1.rfc5849 import (Client, SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER) |