Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add requests as installation requirement #269

Merged
merged 1 commit into from
Jan 27, 2014

Conversation

bennylope
Copy link
Contributor

requests is imported in base_identity.py but not required or documented for installation.

Additionally there were some made to requests's responses around the time of 1.0.0. So if you find that you've got a project with an older version of requests and try to authenticate using the 'rackspace' authentication scheme:

File "/usr/local/venv/myenv/local/lib/python2.7/site-packages/pyrax/__init__.py" in _auth_and_connect
  496.         identity.authenticate()
File "/usr/local/venv/myenv/local/lib/python2.7/site-packages/pyrax/identity/rax_identity.py" in authenticate
  63.             super(RaxIdentity, self).authenticate()
File "/usr/local/venv/myenv/local/lib/python2.7/site-packages/pyrax/base_identity.py" in authenticate
  293.         resp_body = resp.json()

Exception Type: TypeError at /dashboard/business/24011/
Exception Value: 'dict' object is not callable

In earlier versions of requests json was a dictionary. Updating requests solved this problem, but took some digging. It's simple to avoid by requiring a minimum version of the dependency.

If it isn't suitable to require this dependency it would be good to document it somewhere.

Dupe of #268 which was made against the wrong branch.

@coveralls
Copy link

Coverage Status

Coverage increased (+3.47%) when pulling 489198a on bennylope:requests-req into c67c130 on rackspace:working.

EdLeafe added a commit that referenced this pull request Jan 27, 2014
Add requests as installation requirement
@EdLeafe EdLeafe merged commit 5d0c193 into pycontribs:working Jan 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants