litl / rauth

A Python library for OAuth 1.0/a, 2.0, and Ofly.
http://readthedocs.org/docs/rauth/en/latest/
MIT License
1.6k stars 174 forks source link

rauth 0.5.4 fails against requests 1.2.3 #102

Closed rbpasker closed 11 years ago

rbpasker commented 11 years ago

havent done any investigation, but when I pip installed requests==1.1, it started working again


  File "/Users/rbp/Projects/tengahdb/default/lib/python2.7/site-packages/rauth/service.py", line 212, in get_request_token
    r = self.get_raw_request_token(method=method, **kwargs)
  File "/Users/rbp/Projects/tengahdb/default/lib/python2.7/site-packages/rauth/service.py", line 186, in get_raw_request_token
    return session.request(method, self.request_token_url, **kwargs)
  File "/Users/rbp/Projects/tengahdb/default/lib/python2.7/site-packages/rauth/session.py", line 136, in request
    req_kwargs['headers'] = CaseInsensitiveDict(req_kwargs['headers'])
  File "/Users/rbp/Projects/tengahdb/default/lib/python2.7/site-packages/rauth/utils.py", line 55, in __init__
    return super(CaseInsensitiveDict, self).__init__(lowered_d)
  File "/Users/rbp/Projects/tengahdb/default/lib/python2.7/site-packages/requests/structures.py", line 69, in __init__
    self.update(data, **kwargs)
  File "/Users/rbp/Projects/tengahdb/default/lib/python2.7/site-packages/rauth/utils.py", line 75, in update
    self._clear_lower_keys()
AttributeError: 'CaseInsensitiveDict' object has no attribute '_clear_lower_keys'
maxcountryman commented 11 years ago

Thanks for the report. It looks like they changed the case insensitive dictionary object we were (in poor form) relying on.

mwaterfall commented 11 years ago

@maxcountryman I'm also experiencing this! Any news on when 0.5.5 will be pushed?

maxcountryman commented 11 years ago

Hi, this is because Requests changed the object upstream. We should fix this by pulling in our own CaseInsensitiveDict object.

daxiang28 commented 11 years ago

Interested in a fix as well.

maxcountryman commented 11 years ago

0.5.5 should correct this.

rbpasker commented 11 years ago

thanks, i'll try it out

rbpasker commented 11 years ago

i'm the OP... its working for me! thanks!