Skip to content
Myr

Merge pull request #736 from Lukasa/develop

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Make OAuth path hack platform independent.

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 0af7ca7, 55237ad · Browse files · 1 file+5 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−4 removed

  • other:+5 added−4 removed

1 file+5 added−4 removed

modified:requests/_oauth.py+5 added-4 removed
2 unmodified lines
3"""4requests._oauth5~~~~~~~~~~~~~~~67This module comtains the path hack neccesary for oauthlib to be vendored into requests8while allowing upstream changes.7This module contains the path hack necessary for oauthlib to be vendored into8requests while allowing upstream changes.9"""1011import os12import sys
2 unmodified lines
15 from oauthlib.oauth1 import rfc584916 from oauthlib.common import extract_params17 from oauthlib.oauth1.rfc5849 import (Client, SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER)18except ImportError:19 path = os.path.abspath('/'.join(__file__.split('/')[:-1]+['packages']))19 directory = os.path.dirname(__file__)20 path = os.path.join(directory, 'packages')21 sys.path.insert(0, path)22 from oauthlib.oauth1 import rfc584923 from oauthlib.common import extract_params23 from oauthlib.oauth1.rfc5849 import (Client, SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER)24 from oauthlib.oauth1.rfc5849 import (Client, SIGNATURE_HMAC, SIGNATURE_TYPE_AUTH_HEADER)