Replace httplib calls with python-request

Registered by Flavio Percoco on 2013-01-29

The idea is to migrate all httplib calls into something based on python-requests[0].

Since python request already takes care of most of the things related to http requests, headers and different aspects around it (chunks, keep-alive, gizp, json, etc), it could be a good thing to migrate this, and other OS clients to use it.

Couple of more things about python-requests:

1) There's a well formed community around it.
2) It's continuously updated
3) If there's a bug / patch, that can be verified, it'll get in.
4) It's been packaged for Ubuntu, Debian, RHEL and Arch

Some benefits:

* It'll reduce the code that should be maintained
* Cleans up some of the existing code
* Heads clients to a more standard code base

Drawbacks:

* If we find a bug, even though we can contribute back, it'll take a bit more to have that fix pulled in.

This changes would be backward compatible and wont affect how the client works.

[0] http://docs.python-requests.org/en/latest/

Blueprint information

Status:
Started
Approver:
Brian Waldon
Priority:
Undefined
Drafter:
Flavio Percoco
Direction:
Needs approval
Assignee:
Flavio Percoco
Definition:
Approved
Series goal:
None
Implementation:
Needs Code Review
Milestone target:
None
Started by
Flavio Percoco on 2013-03-04

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/python-request,n,z

Addressed by: https://review.openstack.org/23424
    Replace old httpclient with requests

Addressed by: https://review.openstack.org/78269
    Replace old httpclient with requests

The change introduced a bug that's spamming the logs with http connection pool warnings because connections aren't properly being closed:
https://bugs.launchpad.net/python-glanceclient/+bug/1341777

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.