[openstack-dev] [all] Maintaining httplib2 python library
cdent+os at anticdent.org
Fri Mar 18 16:27:48 UTC 2016
On Mon, 14 Mar 2016, Chris Dent wrote:
> wsgi-intercept (I maintain that) can use httplib2, http.lib or
> requests (and if you go back a few versions even more) so those tests
> could be updated to use requests and still use wsgi-intercept if that
> was desired.
I've just released a version of wsgi-intercept (1.2.0 and beyond)
which has explicit support for urllib3:
>  If gabbi were to switch it wouldn't be to requests but probably
> urllib3 because the reason httplib2 was chosen is because it does
> very little for you and makes few guesses. Requests on the other
> hand... However there are no immediate plans to make any changes.
Since the winds of change and dependency limiting are blowing,
I've started a branch in gabbi to switch urllib3:
The proved to be relatively straightforward. What I needed was a
minor facade that translated the httplib2.Http.request method
arguments into appropriate ones for urllib3.PoolManager.request and
then transformed the response object into a dict of headers + status
and a content containing response.data.
If you have a look at the Http() class in gabbi/httpclient.py in
the diff of the pull request linked above it's no big deal. I
suspect it can be simplified and made more straightforward but
what's there gets the tests passing.
Happy to help out or answer questions if somebody thinks that since
I've been there I might be able to.
Chris Dent (¨s¡ã¡õ¡ã)¨s¦à©ß©¥©ß http://anticdent.org/
freenode: cdent tw: @anticdent
More information about the OpenStack-dev