zeromq/pyzmq — pull request #190 by minrk (2012-03-22 22:20:48+00:00)
Title: Bring in gevent_zeromq as zmq.green

@traviscline's great gevent-enabling Socket subclass is quite small, and it would be useful to have it in pyzmq itself. This makes it available as `zmq.green`, and makes a few small tweaks to bring it up to speed with recent changes to a couple of methods. A small tweak is made to zmq.Context that improves the ability to subclass it to make different Socket without having to override the socket-creation method itself, which has some more logic that one shouldn't need to duplicate.

Relevant tests have been subclassed, so that they will be run as well if gevent is available. This brings tests run with gevent to 142 from 101.

Now, to use zmq with gevent, simply:

```python
import zmq.green as zmq
```

and off you go.

@traviscline - if `zmq.green` is not a good choice of name, I'm happy to change it at your recommendation. I'm not familiar enough with that ecosystem to know what's best.