[Python-modules-team] Bug#748903: python-tornado: FTBFS on hurd-i386
Svante Signell
svante.signell at gmail.com
Thu May 22 08:02:55 UTC 2014
On Thu, 2014-05-22 at 09:48 +0200, Samuel Thibault wrote:
> Svante Signell, le Thu 22 May 2014 09:20:59 +0200, a écrit :
> > The attached patch fixes these failures by not using the options
> > SO_REUSEADDR for setsockopt in tornado/netutil.py and SO_ERROR for
> > getsockopt in tornado/iostream.py since they are not yet implemented.
>
> Just to avoid a misunderstanding: they *are* implemented, but only for
> TCP/IP sockets.
I'll add that to the bug report.
> > --- a/tornado_netutil.py 2014-01-09 03:57:56.000000000 +0100
> > +++ b/tornado/netutil.py 2014-05-21 17:38:42.000000000 +0200
> > @@ -119,7 +120,8 @@
> > """
> > sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
> > set_close_exec(sock.fileno())
> > - sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
> > + if sys.platform != 'gnu0':
> > + sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
>
> I would even just drop it completely for all systems: I don't see what
> SO_REUSEADDR can mean for an AF_UNIX socket.
Then you should discuss with upstream. BTW: Other packages do the same
kind of tests, I've seen this before.
> > --- a/tornado/iostream.py 2014-01-04 17:51:39.000000000 +0100
> > +++ b/tornado/iostream.py 2014-05-21 18:42:37.000000000 +0200
> > @@ -687,9 +687,12 @@
> > self.socket = None
> >
> > def get_fd_error(self):
> > - errno = self.socket.getsockopt(socket.SOL_SOCKET,
> > - socket.SO_ERROR)
> > - return socket.error(errno, os.strerror(errno))
> > + if sys.platform != 'gnu0':
> > + errno = self.socket.getsockopt(socket.SOL_SOCKET,
> > + socket.SO_ERROR)
> > + return socket.error(errno, os.strerror(errno))
> > + else:
> > + return None
>
> I would rather just catch the ENOSYS error, and return None in that
> case. Again, the idea is that I don't see what SO_ERROR could actually
> report for AF_UNIX sockets.
Well, the test fails if ENOSYS is returned, I can try to fix that but
this is probably an upstream issue again :(
More information about the Python-modules-team
mailing list