GetStream / stream-python

Python Client - Build Activity Feeds & Streams with GetStream.io
https://getstream.io
BSD 3-Clause "New" or "Revised" License
141 stars 41 forks source link

Allow for client use on app engine with request_toolbelt #43

Closed jmylen closed 8 years ago

jmylen commented 8 years ago

Hey team,

I just started playing around with this client and because of some issues with App Engine and the requests library it took me a while.

In order to get it working I used requests_toolbelt which uses an Adapter compatible with App Engine.

A quick fix on your end to make it compatible would just be to update line 9 in client.py to

from requests.sessions import HTTPAdapter

as this is what's being patched by request_toolbelt as seen in the link below.

https://github.com/sigmavirus24/requests-toolbelt/blob/master/requests_toolbelt/adapters/appengine.py#L126

JelteF commented 8 years ago

I think it makes more sense to change the requests-toolbelt lib. So I made a pull request for it here: https://github.com/sigmavirus24/requests-toolbelt/pull/165

Please let me know if that fixes your issue.

JelteF commented 8 years ago

The patch has been merged so the issue should be fixed now. If other issues still occur please let me know.