Skip to content
Myr

Use logger instead of direct logging call.

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

authored by ayanamist · committed by ayanamist · parent 1be2a55 · Browse files · 1 file+7 added−5 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+7 added−5 removed

  • other:+7 added−5 removed

1 file+7 added−5 removed

modified:requests/packages/oauthlib/oauth1/rfc5849/__init__.py+7 added-5 removed
15 unmodified lines
16from oauthlib.common import Request, urlencode, generate_nonce17from oauthlib.common import generate_timestamp18from . import parameters, signature, utils1920logger = logging.getLogger(__name__)2122SIGNATURE_HMAC = u"HMAC-SHA1"23SIGNATURE_RSA = u"RSA-SHA1"24SIGNATURE_PLAINTEXT = u"PLAINTEXT"25SIGNATURE_METHODS = (SIGNATURE_HMAC, SIGNATURE_RSA, SIGNATURE_PLAINTEXT)
41 unmodified lines
67 collected_params = signature.collect_parameters(68 uri_query=urlparse.urlparse(uri).query,69 body=body,70 headers=headers)69 logging.debug("Collected params: {0}".format(collected_params))71 logger.debug("Collected params: {0}".format(collected_params))7273 normalized_params = signature.normalize_parameters(collected_params)74 normalized_uri = signature.normalize_base_string_uri(request.uri)73 logging.debug("Normalized params: {0}".format(normalized_params))74 logging.debug("Normalized URI: {0}".format(normalized_uri))75 logger.debug("Normalized params: {0}".format(normalized_params))76 logger.debug("Normalized URI: {0}".format(normalized_uri))7778 base_string = signature.construct_base_string(request.http_method,79 normalized_uri, normalized_params)8079 logging.debug("Base signing string: {0}".format(base_string))81 logger.debug("Base signing string: {0}".format(base_string))8283 if self.signature_method == SIGNATURE_HMAC:84 sig = signature.sign_hmac_sha1(base_string, self.client_secret,85 self.resource_owner_secret)
2 unmodified lines
88 else:89 sig = signature.sign_plaintext(self.client_secret,90 self.resource_owner_secret)9190 logging.debug("Signature: {0}".format(sig))92 logger.debug("Signature: {0}".format(sig))93 return sig9495 def get_oauth_params(self):96 """Get the basic OAuth parameters to be used in generating a signature.
793 unmodified lines