gevent-on-pypy / pypycore

gevent.core implemented as cffi module, might be used with pypy
56 stars 16 forks source link

_reuse() #12

Open robvoi opened 10 years ago

robvoi commented 10 years ago

I tried the pypy hack for gevent. My pypy prgram (flask with sse) starts. But when I try to connect I get the following error:

Traceback (most recent call last): File "build/bdist.linux-armv6l/egg/gevent/greenlet.py", line 328, in run result = self._run(_self.args, *_self.kwargs) File "build/bdist.linux-armv6l/egg/gevent/pywsgi.py", line 653, in handle handler = self.handler_class(socket, address, self) File "build/bdist.linux-armv6l/egg/gevent/pywsgi.py", line 175, in init self.rfile = socket.makefile('rb', -1) File "build/bdist.linux-armv6l/egg/gevent/socket.py", line 379, in makefile return _fileobject(type(self)(_sock=self), mode, bufsize) File "/usr/lib/pypy-upstream/lib-python/2.7/socket.py", line 300, in init sock._reuse() AttributeError: 'socket' object has no attribute '_reuse' <Greenlet at 0x4737a10L: <bound method WSGIServer.handle of <WSGIServer at 0x465d630L fileno=6 address=0.0.0.0:9999>>(<socket at 0x4737a30L fileno=8 sock=192.168.1.199:, ('84.63.102.205', 52661))> failed with AttributeError

I found a comment which may help here: https://mail.python.org/pipermail/pypy-commit/2013-August/076563.html

And a comment from the pypy-dev mailing list with an interesting link:

"No, this isn't a bug in PyPy. If gevent wants to use the internal details of the socket module in way's that aren't defined, they need to pass somethign which matches the required interface.

it's worth noting that eventlet had the same issue, and it was fixed here (thanks to... Alex :)):

https://github.com/eventlet/eventlet/commit/2633322d6581beacd39d832284f17d461eb25098 "

schmir commented 10 years ago

see #11. pypycore needs a maintainer, I wouldn't use it for serious work.