[pypy-dev] AttributeError: 'socket' object has no attribute '_reuse'

Alex Gaynor alex.gaynor at gmail.com
Thu Dec 19 17:01:11 CET 2013


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.

Alex


On Thu, Dec 19, 2013 at 7:59 AM, Piotr Skamruk <piotr.skamruk at gmail.com>wrote:

> It's because lib-python/2.7/socket.py has reference to _reuse (around
> 185 line - look at Antonios comment in
> https://mail.python.org/pipermail/pypy-commit/2013-August/076563.html
> ), but this method isn't defined in rpython/rlib/rsocket.py
>
> You should fill issue in https://bugs.pypy.org
> Probably it will be connected in some way with
> https://bugs.pypy.org/issue1568
>
> 2013/12/19 Robert Voigtländer <r.voigtlaender at gmail.com>:
> > Thanks to Piotr I now got gevent installed.
> > But now I get a new error when trying to run my python program. The
> > Webserver (with SSE) runs but when I try to load a site I get the error
> > below.
> >
> > I need to get it running .. pypy is so awesomely faster than cpython.
> >
> >
> > Robert
> >
> >
> > 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
> >
> >
> > _______________________________________________
> > pypy-dev mailing list
> > pypy-dev at python.org
> > https://mail.python.org/mailman/listinfo/pypy-dev
> >
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> https://mail.python.org/mailman/listinfo/pypy-dev
>



-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20131219/44e345f2/attachment.html>


More information about the pypy-dev mailing list