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

Eventlet support #26

Closed
jmg opened this issue Nov 23, 2012 · 7 comments
Closed

Eventlet support #26

jmg opened this issue Nov 23, 2012 · 7 comments

Comments

@jmg
Copy link

jmg commented Nov 23, 2012

First at all, thanks for porting requests to the asynchronous world, I loved it!

However I'm using Eventlet instead of Gevent so I adapted the code to make
it work with Eventlet. You can see it at https://github.com/jmg/erequests.

I was wondering if we can make a unified version where the library can
detect or be configured to use either Eventlet or Gevent based on the user
needs.

Many thanks.

@kennethreitz
Copy link
Collaborator

You're not alone :)

https://github.com/saghul/erequests

@jmg
Copy link
Author

jmg commented Nov 23, 2012

Oh, nice, forsure I'm not! I should have looked better before making my own implementation.

But what do you think about making a library that could work both with gevent and eventlet?

@piotr-dobrogost
Copy link

Related issues: kennethreitz/requests#3, kennethreitz/requests#207
What's the reason you use eventlet instead of gevent?

@jmg
Copy link
Author

jmg commented Nov 23, 2012

Well, I don't have an specific reason but one can say because it's pure python. While gevent depends on C modules. Anyway I don't think Eventlet should be deprecated because of the gevent's fork and would be good to provide support for it on a unified asynchronous requests library.

@piotr-dobrogost
Copy link

Looks like all is needed are changes in code from kennethreitz/requests#207 with new pull request.

@jmg
Copy link
Author

jmg commented Nov 23, 2012

Actually I noticed that those changes were already merged into master: https://github.com/kennethreitz/requests/blob/2f6b44f8f8a1c8067c7ecf1f0388c030c4e0278f/requests/async.py
But now are removed from the requests library. @kennethreitz you may explain why?

@colinhowe
Copy link

I realise this is old but to chime in... gevent monkey patches everything. With eventlet you can monkey patch just the bits you want. Much nicer for adding to existing applications where you're not 100% sure of all the locations of socket and whether it's safe to async them.

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

No branches or pull requests

4 participants