gwik/geventhttpclient — pull request #30 by lvella (2013-06-26 05:03:47+00:00)
Title: PyPy friendly CFFI interface with native parser.

In an attempt to better support PyPy on Gevent and its ecosystem, this is a port of _parser.c to CFFI interface, that is the preferred way to call C from PyPy. When installing, the '_parser.c' file will not be built if PyPy is detected, only the 'http_parser.c' from Nginx, that is loaded from the 'parser.py' module. If PyPy is not detected, original CPython extension will be used normally, because '_parser.c' will be built and 'parser.py' will simply import and expose the native module classes.

I wish I knew how to run all those tests without manually loading each test module and running each test function, but for all the tests I cared to run, it passed (when forcing CFFI usage on CPython, on PyPy things are more complicated...).

Gevent support on PyPy is currently alpha, at best, but I hope you accept this patch as a step in the continuous effort to have it fully supported.